winex11.drv: Add virtual desktop display device handler.
The virtual desktop display device handler is actually the Xinerama handler, but with a much higher priority. So that it will be preferred in virtual desktop mode when other display device handlers are introduced, e.g., the XRandR handler. 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
efbbe66669
commit
ec09dcf895
|
@ -304,6 +304,7 @@ void xinerama_init( unsigned int width, unsigned int height )
|
|||
{
|
||||
struct x11drv_display_device_handler handler;
|
||||
MONITORINFOEXW *primary;
|
||||
BOOL desktop_mode = FALSE;
|
||||
int i;
|
||||
RECT rect;
|
||||
|
||||
|
@ -318,6 +319,7 @@ void xinerama_init( unsigned int width, unsigned int height )
|
|||
query_desktop_work_area( &default_monitor.rcWork );
|
||||
nb_monitors = 1;
|
||||
monitors = &default_monitor;
|
||||
desktop_mode = TRUE;
|
||||
}
|
||||
|
||||
primary = get_primary();
|
||||
|
@ -334,8 +336,8 @@ void xinerama_init( unsigned int width, unsigned int height )
|
|||
(monitors[i].dwFlags & MONITORINFOF_PRIMARY) ? " (primary)" : "" );
|
||||
}
|
||||
|
||||
handler.name = "Xinerama";
|
||||
handler.priority = 100;
|
||||
handler.name = desktop_mode ? "Desktop" : "Xinerama";
|
||||
handler.priority = desktop_mode ? 1000 : 100;
|
||||
handler.pGetGpus = xinerama_get_gpus;
|
||||
handler.pGetAdapters = xinerama_get_adapters;
|
||||
handler.pGetMonitors = xinerama_get_monitors;
|
||||
|
|
Loading…
Reference in New Issue