mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 16:36:26 +01:00
Only schedule a frame if client has requested a frame callback
When a client hasn't damaged its surface, we only need to schedule an output frame if the client has requested a frame callback.
This commit is contained in:
parent
c0811fcf87
commit
f5ba8006c9
1 changed files with 4 additions and 2 deletions
|
@ -681,9 +681,11 @@ static void damage_surface_iterator(struct sway_output *output, struct sway_view
|
||||||
wlr_output_damage_add_box(output->damage, &box);
|
wlr_output_damage_add_box(output->damage, &box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!wl_list_empty(&surface->current.frame_callback_list)) {
|
||||||
output->surface_needs_frame = true;
|
output->surface_needs_frame = true;
|
||||||
wlr_output_schedule_frame(output->wlr_output);
|
wlr_output_schedule_frame(output->wlr_output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void output_damage_surface(struct sway_output *output, double ox, double oy,
|
void output_damage_surface(struct sway_output *output, double ox, double oy,
|
||||||
struct wlr_surface *surface, bool whole) {
|
struct wlr_surface *surface, bool whole) {
|
||||||
|
|
Loading…
Reference in a new issue