diff options
author | Rouven Czerwinski <rouven@czerwinskis.de> | 2021-08-17 20:48:17 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-08-17 21:07:43 +0200 |
commit | aa78c50bf15e731a9b70c1d479892500cabda03f (patch) | |
tree | 2c8eda819da334e468e369e039307c127a36ee01 | |
parent | 59b292b69165d2dee0b2398ed2d0b38dea98d90f (diff) | |
download | wlroots-aa78c50bf15e731a9b70c1d479892500cabda03f.tar.xz |
output: check output enabled before sending frame
Similar to commit 85757665e6e1 ("backend/drm: Check if output is enabled
before sending frame event"), check if the output is still enabled
before sending the frame event. This fixes the bug not only for the DRM
backend, but for wayland and X11 as well.
-rw-r--r-- | types/wlr_output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c index 741ecf0b..eea282dc 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -924,7 +924,9 @@ void wlr_output_attach_buffer(struct wlr_output *output, void wlr_output_send_frame(struct wlr_output *output) { output->frame_pending = false; - wlr_signal_emit_safe(&output->events.frame, output); + if (output->enabled) { + wlr_signal_emit_safe(&output->events.frame, output); + } } static void schedule_frame_handle_idle_timer(void *data) { |