From c118ed9252cd182fbab6078e6b22d11d2673d9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 3 Jan 2020 18:58:26 +0100 Subject: [PATCH] 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. --- wayland.c | 4 ++-- 1 file 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 = {