From 3099cd21245e74dec171cee05188cc3e0160bfc7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Oct 2025 02:28:38 +0000 Subject: [PATCH 1/2] Fix #148142: Cannot interact with normal windows (GNOME 48.4) Resolve regression with GNOME-48 & LIBDECOR caused by fix for GNOME-49 (see !148104). New normal (non-maximized) windows were not refreshing and ignored cursor input. Workaround the issue be resetting the title. See code-comments for details. Ref !148178 --- intern/ghost/intern/GHOST_WindowWayland.cc | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/intern/ghost/intern/GHOST_WindowWayland.cc b/intern/ghost/intern/GHOST_WindowWayland.cc index ca54d228220..3d7308fdd56 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cc +++ b/intern/ghost/intern/GHOST_WindowWayland.cc @@ -1034,7 +1034,31 @@ static void gwl_window_frame_update_from_pending_no_lock(GWL_Window *win) if (decor.initial_configure_seen == false) { decor.initial_configure_seen = true; if (decor.initial_configure_state) { - gwl_libdecor_window_initial_configure_state_set(&decor, gwl_window_state_get(win)); + const GHOST_TWindowState state_current = gwl_window_state_get(win); + const GHOST_TWindowState state = decor.initial_configure_state.value(); + + gwl_libdecor_window_initial_configure_state_set(&decor, state_current); + + /* An unfortunate hack for GNOME-48 and older. + * It's necessary to force the window to refresh, + * otherwise the window cannot be interacted with, see: #148142. + * + * Since there doesn't seem to a be a way to request an + * update directly: reset the title to force an update. + * + * Note that temporarily maximizing the window also works + * but this is more likely to flicker on startup. + * + * Interestingly the other call to #gwl_libdecor_window_initial_configure_state_set + * would also suffer from this problem with GNOME-49 but in that case + * committing the surface resolves the problem. */ + if (((state == state_current) && (state == GHOST_kWindowStateNormal))) { + /* Ensure the title changes. */ + const std::string &title = win->title; + const char *title_swap = " "; + libdecor_frame_set_title(decor.frame, title_swap + (title.empty() ? 0 : 1)); + libdecor_frame_set_title(decor.frame, title.c_str()); + } } } From e059c75ef57a05d0ac1b46ac94759e288d2f1fc0 Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Thu, 16 Oct 2025 04:30:56 +0200 Subject: [PATCH 2/2] Tests: Add delay for UI multi window tests on Windows Similar to #146143, the `view3d_edit_mode_multi_window` currently fails on the Windows build bot. This commit extends the platforms that require an extra delay to avoid failures. Pull Request: https://projects.blender.org/blender/blender/pulls/148078 --- tests/python/ui_simulate/test_undo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python/ui_simulate/test_undo.py b/tests/python/ui_simulate/test_undo.py index 05a6f309385..ab36e4615f5 100644 --- a/tests/python/ui_simulate/test_undo.py +++ b/tests/python/ui_simulate/test_undo.py @@ -17,9 +17,9 @@ _MENU_CONFIRM_HACK = True # the corresponding tests to run as expected. See: #136012. _MENU_CONFIRM_HACK_MULTI_WINDOW_PAUSE_SECONDS = 1 / 60 -# WARNING: macOS requires extra delay (it's unclear why), see: #146143. +# WARNING: macOS and windows require an extra delay (it's unclear why), see: #146143. import sys -if sys.platform == "darwin": +if sys.platform in {"darwin", "win32"}: _MENU_CONFIRM_HACK_MULTI_WINDOW_PAUSE_SECONDS = 1 / 6 del sys