mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: skip frame when there not-resize-complete client when disable animaitons
This commit is contained in:
parent
13603789a2
commit
ea5160ba7e
1 changed files with 14 additions and 5 deletions
19
src/mango.c
19
src/mango.c
|
|
@ -2237,6 +2237,10 @@ void commitnotify(struct wl_listener *listener, void *data) {
|
|||
c->animation.tagining)
|
||||
return;
|
||||
|
||||
if (c->configure_serial &&
|
||||
c->configure_serial <= c->surface.xdg->current.configure_serial)
|
||||
c->configure_serial = 0;
|
||||
|
||||
if (c == grabc || !c->dirty)
|
||||
return;
|
||||
|
||||
|
|
@ -3775,11 +3779,6 @@ void rendermon(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
}
|
||||
|
||||
// Draw frames for all clients
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
need_more_frames = client_draw_frame(c) || need_more_frames;
|
||||
}
|
||||
|
||||
wl_list_for_each_safe(c, tmp, &fadeout_clients, fadeout_link) {
|
||||
need_more_frames = client_draw_fadeout_frame(c) || need_more_frames;
|
||||
}
|
||||
|
|
@ -3788,8 +3787,18 @@ void rendermon(struct wl_listener *listener, void *data) {
|
|||
need_more_frames = layer_draw_fadeout_frame(l) || need_more_frames;
|
||||
}
|
||||
|
||||
// Draw frames for all clients
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
need_more_frames = client_draw_frame(c) || need_more_frames;
|
||||
if (!animations && c->configure_serial && !c->isfloating &&
|
||||
client_is_rendered_on_mon(c, m) && !client_is_stopped(c))
|
||||
goto skip;
|
||||
}
|
||||
|
||||
wlr_scene_output_commit(m->scene_output, NULL);
|
||||
|
||||
skip:
|
||||
|
||||
// Send frame done notification
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
wlr_scene_output_send_frame_done(m->scene_output, &now);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue