From 06da2b88ff5b7b2a24e3873aeed3bd989c69968c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Mar 2022 17:51:21 +0530 Subject: [PATCH] Also check if states are empty --- glfw/wl_window.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 6c502dd88..63a787f57 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -490,13 +490,14 @@ static void xdgSurfaceHandleConfigure(void* data, uint32_t new_states = window->wl.pending.toplevel_states; int width = window->wl.pending.width; int height = window->wl.pending.height; - if (!window->wl.surface_configured_once && !width && !height && !window->wl.decorations.serverSide && getenv("XAUTHORITY") && strstr(getenv("XAUTHORITY"), "mutter")) { - // https://github.com/kovidgoyal/kitty/issues/4802 + if (!window->wl.surface_configured_once) { window->wl.surface_configured_once = true; - debug("Ignoring first zero size surface configure event on mutter.\n"); - return; + if (!width && !height && !new_states && !window->wl.decorations.serverSide && getenv("XAUTHORITY") && strstr(getenv("XAUTHORITY"), "mutter")) { + // https://github.com/kovidgoyal/kitty/issues/4802 + debug("Ignoring first empty surface configure event on mutter.\n"); + return; + } } - window->wl.surface_configured_once = true; if (new_states != window->wl.current.toplevel_states || width != window->wl.current.width ||