diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index d478cbdcb3a..a0495c44b16 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -154,6 +154,7 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) max_width = primary_rect.right - primary_rect.left; max_height = primary_rect.bottom - primary_rect.top; xinerama_init( width, height ); + X11DRV_DisplayDevices_Init( TRUE ); /* initialize the available resolutions */ dd_modes = X11DRV_Settings_SetHandlers("desktop", diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index 99a70beb888..ce2c568ad8e 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -339,7 +339,7 @@ static void cleanup_devices(void) SetupDiDestroyDeviceInfoList(devinfo); } -void X11DRV_DisplayDevices_Init(void) +void X11DRV_DisplayDevices_Init(BOOL force) { static const WCHAR init_mutexW[] = {'d','i','s','p','l','a','y','_','d','e','v','i','c','e','_','i','n','i','t',0}; HANDLE mutex; @@ -366,7 +366,7 @@ void X11DRV_DisplayDevices_Init(void) } /* Avoid unnecessary reinit */ - if (disposition != REG_CREATED_NEW_KEY) + if (!force && disposition != REG_CREATED_NEW_KEY) goto done; TRACE("via %s\n", wine_dbgstr_a(handler.name)); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 8031bebc93e..ed5e2683919 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -736,7 +736,7 @@ struct x11drv_display_device_handler }; extern void X11DRV_DisplayDevices_SetHandler(const struct x11drv_display_device_handler *handler) DECLSPEC_HIDDEN; -extern void X11DRV_DisplayDevices_Init(void) DECLSPEC_HIDDEN; +extern void X11DRV_DisplayDevices_Init(BOOL force) DECLSPEC_HIDDEN; /* XIM support */ extern BOOL X11DRV_InitXIM( const char *input_style ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 69478741f1f..21807af3f18 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -597,7 +597,7 @@ static BOOL process_attach(void) X11DRV_InitKeyboard( gdi_display ); if (use_xim) use_xim = X11DRV_InitXIM( input_style ); - X11DRV_DisplayDevices_Init(); + X11DRV_DisplayDevices_Init(FALSE); return TRUE; }