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 --- dlls/winex11.drv/xinerama.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c index 370d34e9cd..8e08221343 100644 --- a/dlls/winex11.drv/xinerama.c +++ b/dlls/winex11.drv/xinerama.c @@ -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;