aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2025-01-05 02:59:19 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-01-18 08:23:40 +0000
commitab5a168dbffb63e17c9067133ab55c97d800ef1d (patch)
treea3c1d94018ffc949ab64e50a8b707e3a63241940
parentrender: Expose render_overlay (diff)
terminal: Refresh only overlay when flash expires
If we call render_refresh, that will wait for a callback to the main surface. In the case of a flash, the main surface might not get callbacks if the compositor implements fancy culling optimizations like wlroots wlr_scene compositors such as sway version >=1.10.
-rw-r--r--terminal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index 5a74631a..7b5a4d2d 100644
--- a/terminal.c
+++ b/terminal.c
@@ -419,7 +419,12 @@ fdm_flash(struct fdm *fdm, int fd, int events, void *data)
(unsigned long long)expiration_count);
term->flash.active = false;
- render_refresh(term);
+ render_overlay(term);
+
+ // since the overlay surface is synced with the main window surface, we have
+ // to commit the main surface for the compositor to acknowledge the new
+ // overlay state.
+ wl_surface_commit(term->window->surface.surf);
return true;
}