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

winex11.drv: Initialize display devices before getting primary desktop rectangle.

Otherwise, the retrieved primary desktop might be from the last explorer instance if we launch new explorer instances before wine server fully shuts down. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6cba24ef
......@@ -147,15 +147,18 @@ static LONG X11DRV_desktop_SetCurrentMode(int mode)
*/
void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
{
RECT primary_rect = get_primary_monitor_rect();
RECT primary_rect;
root_window = win;
managed_mode = FALSE; /* no managed windows in desktop mode */
max_width = primary_rect.right - primary_rect.left;
max_height = primary_rect.bottom - primary_rect.top;
xinerama_init( width, height );
X11DRV_DisplayDevices_Init( TRUE );
primary_rect = get_primary_monitor_rect();
max_width = primary_rect.right - primary_rect.left;
max_height = primary_rect.bottom - primary_rect.top;
/* initialize the available resolutions */
dd_modes = X11DRV_Settings_SetHandlers("desktop",
X11DRV_desktop_GetCurrentMode,
......
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