After 25167fb286822c93582457815bcf069fef040976 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 --- dlls/winex11.drv/settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index 800b65dbfd..a4f172037c 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -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,