From 87b00ced3d308a9168828c0e38ecffa0640621a0 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Sun, 1 Nov 2009 18:18:48 +0000 Subject: [PATCH] Cygwin/X: Setup screen layout in Xinerama mode Setup screen layout according to the screen window native window positions in Xinerama mode Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winscrinit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 99d5a464e..37ec27e08 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -239,6 +239,16 @@ winScreenInit (int index, else winErrorFVerb(2, "winScreenInit - Using software cursor\n"); + /* + Note the screen origin in a normalized coordinate space where (0,0) is at the top left + of the native virtual desktop area + */ + dixScreenOrigins[index].x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); + dixScreenOrigins[index].y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); + + ErrorF("Screen %d added at XINERAMA coordinate (%d,%d).\n", + index, dixScreenOrigins[index].x, dixScreenOrigins[index].y); + #if CYGDEBUG || YES winDebug ("winScreenInit - returning\n"); #endif