[X11 WSLg] Fix stuck on the main page when launching in fullscreen mode

This commit is contained in:
Cliear 2024-07-24 18:16:02 +08:00
parent 77e18da5ff
commit 18c3e4ebbe
1 changed files with 2 additions and 0 deletions

View File

@ -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;