From 62cc96b3a4eee779f6dbd92f39ebdb828fec43aa Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Tue, 20 Aug 2024 19:25:20 +0300 Subject: [PATCH] scene: update output geom on commit after dropping pending damage Otherwise the whole output damage gets ignored. --- types/scene/wlr_scene.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 0211f965..b3d9aade 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -1520,16 +1520,6 @@ static void scene_output_handle_commit(struct wl_listener *listener, void *data) struct wlr_output_event_commit *event = data; const struct wlr_output_state *state = event->state; - bool force_update = state->committed & ( - WLR_OUTPUT_STATE_TRANSFORM | - WLR_OUTPUT_STATE_SCALE | - WLR_OUTPUT_STATE_SUBPIXEL); - - if (force_update || state->committed & (WLR_OUTPUT_STATE_MODE | - WLR_OUTPUT_STATE_ENABLED)) { - scene_output_update_geometry(scene_output, force_update); - } - // if the output has been committed with a certain damage, we know that region // will be acknowledged by the backend so we don't need to keep track of it // anymore @@ -1543,6 +1533,16 @@ static void scene_output_handle_commit(struct wl_listener *listener, void *data) } } + bool force_update = state->committed & ( + WLR_OUTPUT_STATE_TRANSFORM | + WLR_OUTPUT_STATE_SCALE | + WLR_OUTPUT_STATE_SUBPIXEL); + + if (force_update || state->committed & (WLR_OUTPUT_STATE_MODE | + WLR_OUTPUT_STATE_ENABLED)) { + scene_output_update_geometry(scene_output, force_update); + } + if (scene_output->scene->debug_damage_option == WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT && !wl_list_empty(&scene_output->damage_highlight_regions)) { wlr_output_schedule_frame(scene_output->output);