From 18c3e4ebbe91c037cdacbe3dde5aee3dd95c4cc9 Mon Sep 17 00:00:00 2001 From: Cliear <1979454239@qq.com> Date: Wed, 24 Jul 2024 18:16:02 +0800 Subject: [PATCH] [X11 WSLg] Fix stuck on the main page when launching in fullscreen mode --- platform/linuxbsd/x11/display_server_x11.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index d6eb101a686..b0018495caa 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -2650,6 +2650,7 @@ void DisplayServerX11::_set_wm_fullscreen(WindowID p_window, bool p_enabled, boo if (p_enabled) { // Set the window as resizable to prevent window managers to ignore the fullscreen state flag. _update_size_hints(p_window); + XMoveWindow(x11_display, wd.x11_window, 1, 1); } // Using EWMH -- Extended Window Manager Hints @@ -2687,6 +2688,7 @@ void DisplayServerX11::_set_wm_fullscreen(WindowID p_window, bool p_enabled, boo if (!p_enabled) { // Reset the non-resizable flags if we un-set these before. _update_size_hints(p_window); + XMoveWindow(x11_display, wd.x11_window, wd.position.x, wd.position.y); // put back or remove decorations according to the last set borderless state Hints hints;