From ab4f46059793cbdd7942b128db970de95af37ed3 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 6 Mar 2023 16:57:27 +0100 Subject: Set output damage during direct scan-out During direct scan-out, pass the damaged region to the wlroots backend. --- sway/desktop/output.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sway/desktop/output.c') diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 91a5936a..17bce123 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -571,6 +571,11 @@ static int output_repaint_timer_handler(void *data) { fullscreen_con = workspace->current.fullscreen; } + pixman_region32_t frame_damage; + get_frame_damage(output, &frame_damage); + wlr_output_set_damage(wlr_output, &frame_damage); + pixman_region32_fini(&frame_damage); + if (fullscreen_con && fullscreen_con->view && !debug.noscanout) { // Try to scan-out the fullscreen view static bool last_scanned_out = false; @@ -609,11 +614,6 @@ static int output_repaint_timer_handler(void *data) { pixman_region32_fini(&damage); - pixman_region32_t frame_damage; - get_frame_damage(output, &frame_damage); - wlr_output_set_damage(wlr_output, &frame_damage); - pixman_region32_fini(&frame_damage); - if (!wlr_output_commit(wlr_output)) { return 0; } -- cgit v1.2.3