mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-20 06:59:50 -05:00
opt: optimize animaiton frame fresh
This commit is contained in:
parent
e03be59c80
commit
cbfd20bff8
3 changed files with 14 additions and 3 deletions
|
|
@ -728,7 +728,7 @@ void init_fadeout_client(Client *c) {
|
||||||
wl_list_insert(&fadeout_clients, &fadeout_cient->fadeout_link);
|
wl_list_insert(&fadeout_clients, &fadeout_cient->fadeout_link);
|
||||||
|
|
||||||
// 请求刷新屏幕
|
// 请求刷新屏幕
|
||||||
wlr_output_schedule_frame(c->mon->wlr_output);
|
request_fresh_all_monitors();
|
||||||
}
|
}
|
||||||
|
|
||||||
void client_commit(Client *c) {
|
void client_commit(Client *c) {
|
||||||
|
|
@ -759,7 +759,7 @@ void client_commit(Client *c) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 请求刷新屏幕
|
// 请求刷新屏幕
|
||||||
wlr_output_schedule_frame(c->mon->wlr_output);
|
request_fresh_all_monitors();
|
||||||
}
|
}
|
||||||
|
|
||||||
void client_set_pending_state(Client *c) {
|
void client_set_pending_state(Client *c) {
|
||||||
|
|
|
||||||
|
|
@ -190,3 +190,13 @@ struct wlr_scene_tree *wlr_scene_tree_snapshot(struct wlr_scene_node *node,
|
||||||
|
|
||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void request_fresh_all_monitors(void) {
|
||||||
|
Monitor *m = NULL;
|
||||||
|
wl_list_for_each(m, &mons, link) {
|
||||||
|
if (!m->wlr_output->enabled) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
wlr_output_schedule_frame(m->wlr_output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -697,6 +697,7 @@ static void resize_tile_client(Client *grabc, bool isdrag, int offsetx,
|
||||||
int offsety, unsigned int time);
|
int offsety, unsigned int time);
|
||||||
static void refresh_monitors_workspaces_status(Monitor *m);
|
static void refresh_monitors_workspaces_status(Monitor *m);
|
||||||
static void init_client_properties(Client *c);
|
static void init_client_properties(Client *c);
|
||||||
|
static void request_fresh_all_monitors(void);
|
||||||
|
|
||||||
#include "data/static_keymap.h"
|
#include "data/static_keymap.h"
|
||||||
#include "dispatch/bind_declare.h"
|
#include "dispatch/bind_declare.h"
|
||||||
|
|
@ -4019,7 +4020,7 @@ skip:
|
||||||
wlr_output_state_finish(&pending);
|
wlr_output_state_finish(&pending);
|
||||||
|
|
||||||
if (need_more_frames) {
|
if (need_more_frames) {
|
||||||
wlr_output_schedule_frame(m->wlr_output);
|
request_fresh_all_monitors();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue