winex11.drv: Handle display device changes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
31445c3264
commit
7f57cda707
|
@ -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",
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue