aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-03 17:58:26 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-03 17:58:26 +0000
commitc118ed9252cd182fbab6078e6b22d11d2673d9c4 (patch)
tree1df17dfff478c0f2b7f9a63ba96f5333d0832077
parentrender: refresh: ensure window has been configured (diff)
wayland: configure: resize before changing visual focus
This hopefully fixes and issue where the visual focus in/out caused a render refresh with the *old* size. This caused the occasional flicker at startup, or when resizing the window. By placing the resize call before the visual focus in/out, we ensure the refresh uses the new size. This is a temporary workaround. The correct solution is to ensure we only call refresh() once.
-rw-r--r--wayland.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wayland.c b/wayland.c
index 603eb441..d78b4afc 100644
--- a/wayland.c
+++ b/wayland.c
@@ -507,12 +507,12 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
win->is_configured = true;
+ render_resize(term, win->configure.width, win->configure.height);
+
if (win->configure.is_activated)
term_visual_focus_in(term);
else
term_visual_focus_out(term);
-
- render_resize(term, win->configure.width, win->configure.height);
}
static const struct xdg_surface_listener xdg_surface_listener = {