Module: wine Branch: master Commit: c69bb0342ca5e2b30f542ad4e61ae6bc404f22a1 URL: https://source.winehq.org/git/wine.git/?a=commit;h=c69bb0342ca5e2b30f542ad4e...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Thu May 7 16:17:28 2020 +0800
winex11.drv: Update _NET_WM_STATE before resizing windows.
According to the Extended Window Manager Hints (EWMH) spec 1.3 regarding _NET_WM_STATE_FULLSCREEN, "the Window Manager is responsible for restoring the original geometry after a switch from fullscreen back to normal window.", which means that removing _NET_WM_STATE_FULLSCREEN from a window may cause the window to receive a ConfigureNotify event to restore the window size, thus causing a application resize action to be overwritten by the window managers.
Fix a game called Mugsters becomes maximized after exiting full screen.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/tests/win.c | 3 --- dlls/winex11.drv/window.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 9845f9830d..700e60db17 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -8452,10 +8452,7 @@ static void test_fullscreen(void) if (rc.right - rc.left == 100 && rc.bottom - rc.top == 100) break; } - /* FVWM used by TestBots are not EWMH compliant. So this bug doesn't appear. */ - todo_wine_if(rc.right - rc.left != 100) ok(rc.right - rc.left == 100, "Expect width %d, got %d.\n", 100, rc.right - rc.left); - todo_wine_if(rc.bottom - rc.top != 100) ok(rc.bottom - rc.top == 100, "Expect height %d, got %d.\n", 100, rc.bottom - rc.top); DestroyWindow(hwnd);
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 52e345ceb6..c773c278b7 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1262,6 +1262,7 @@ static void sync_window_position( struct x11drv_win_data *data,
set_size_hints( data, style ); set_mwm_hints( data, style, ex_style ); + update_net_wm_states( data ); data->configure_serial = NextRequest( data->display ); XReconfigureWMWindow( data->display, data->whole_window, data->vis.screen, mask, &changes ); #ifdef HAVE_LIBXSHAPE