Module: wine Branch: master Commit: b7b4bacaf99661e07c2f07a0260680b4e8bed4f8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=b7b4bacaf99661e07c2f07a02...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Tue Nov 5 21:05:31 2019 +0800
winex11.drv: Move the desktop fullscreen check after desktop init.
After 25167fb286822c93582457815bcf069fef040976, get_primary_monitor_rect(), which is used in is_window_rect_fullscreen(), may return the primary screen size set by the last explorer instance if wineserver didn't fully shuts down. Also get_primary_monitor_rect() no longer reports the host primary monitor rect before virtual desktop initialization now. So move the desktop fullscreen check after desktop initialization so that primary screen size is updated and valid.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winex11.drv/desktop.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 2428293c4f..d70b38b2b3 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -281,7 +281,6 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) XSetWindowAttributes win_attr; Window win; Display *display = thread_init_display(); - RECT rect; WCHAR name[MAX_PATH];
if (!GetUserObjectInformationW( GetThreadDesktop( GetCurrentThreadId() ), @@ -308,18 +307,17 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) 0, 0, width, height, 0, default_visual.depth, InputOutput, default_visual.visual, CWEventMask | CWCursor | CWColormap, &win_attr ); if (!win) return FALSE; + if (!create_desktop_win_data( win )) return FALSE;
- SetRect( &rect, 0, 0, width, height ); - if (is_window_rect_fullscreen( &rect )) + X11DRV_init_desktop( win, width, height ); + if (is_desktop_fullscreen()) { TRACE("setting desktop to fullscreen\n"); XChangeProperty( display, win, x11drv_atom(_NET_WM_STATE), XA_ATOM, 32, PropModeReplace, (unsigned char*)&x11drv_atom(_NET_WM_STATE_FULLSCREEN), 1); } - if (!create_desktop_win_data( win )) return FALSE; XFlush( display ); - X11DRV_init_desktop( win, width, height ); return TRUE; }