From 93dfe19c3547591e13e51406fa8bcbd2213b54a5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Apr 2021 14:04:12 +0530 Subject: [PATCH] GNOME: Fix maximize state not being remembered when focus changes and window decorations are hidden Apparently mutter needs window geometry set after the surface commit not before, otherwise it doesnt "stick". When decorations are not hidden there were other commits caused by the decorations, masking the issue. Fixes #3507 --- docs/changelog.rst | 3 +++ glfw/wl_window.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index f31fccd8f..f46a5904e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -22,6 +22,9 @@ To update |kitty|, :doc:`follow the instructions `. - icat kitten: Respect EXIF orientation when displaying JPEG images (:iss:`3518`) +- GNOME: Fix maximize state not being remembered when focus changes and window + decorations are hidden (:iss:`3507`) + 0.20.1 [2021-04-19] ---------------------- diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 71a419ac8..9aaa8de69 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -451,11 +451,11 @@ static void xdgToplevelHandleConfigure(void* data, debug("final window content size: %dx%d\n", window->wl.width, window->wl.height); _glfwInputWindowFocus(window, window->wl.toplevel_states & TOPLEVEL_STATE_ACTIVATED); ensure_csd_resources(window); + wl_surface_commit(window->wl.surface); #define geometry window->wl.decorations.geometry debug("Setting window geometry: x=%d y=%d %dx%d\n", geometry.x, geometry.y, geometry.width, geometry.height); xdg_surface_set_window_geometry(window->wl.xdg.surface, geometry.x, geometry.y, geometry.width, geometry.height); #undef geometry - wl_surface_commit(window->wl.surface); if (live_resize_done) _glfwInputLiveResize(window, false); }