Commit b7b4baca authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

winex11.drv: Move the desktop fullscreen check after desktop init.

After 25167fb2, 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: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent acf03ed9
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment