winex11.drv: Fix NoRes mode handler having an empty mode.

After 25167fb286 get_primary_monitor_rect()
returns an empty rectangle before X11DRV_DisplayDevices_Init() is called.
So use get_host_primary_monitor_rect() to get the current X desktop size.
It's also more intuitive this way.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2019-11-05 21:05:45 +08:00 committed by Alexandre Julliard
parent b7b4bacaf9
commit 427152ec7b
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ static LONG X11DRV_nores_SetCurrentMode(int mode)
/* default handler only gets the current X desktop resolution */
void X11DRV_Settings_Init(void)
{
RECT primary = get_primary_monitor_rect();
RECT primary = get_host_primary_monitor_rect();
X11DRV_Settings_SetHandlers("NoRes",
X11DRV_nores_GetCurrentMode,
X11DRV_nores_SetCurrentMode,