summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-04-24 23:49:31 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-04-24 23:49:31 -0700
commitc4475218648120d73c6315cb4e1ef0c1b6706410 (patch)
treed0771677ef267f7be169ef29230c45b186bb26dd
parentc7e824186d98558c4e3c38de60e11158a05bf72c (diff)
XQuartz: More multi-monitor work... reverted Ben's workaround (worked for side-by-side only) and added more debugging.
-rw-r--r--hw/xquartz/darwin.c16
-rw-r--r--hw/xquartz/xpr/xprScreen.c10
2 files changed, 17 insertions, 9 deletions
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index e971aaf43..e4d440826 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -367,7 +367,7 @@ static int DarwinMouseProc(
1, // min resolution
1 ); // max resolution
InitValuatorAxisStruct( pPointer,
- 1, // X axis
+ 1, // Y axis
0, // min value
16000, // max value (fixme screen size?)
1, // resolution (fixme ?)
@@ -560,8 +560,7 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
/* Find leftmost screen. If there's a tie, take the topmost of the two. */
for (i = 1; i < pScreenInfo->numScreens; i++) {
if (dixScreenOrigins[i].x < left ||
- (dixScreenOrigins[i].x == left &&
- dixScreenOrigins[i].y < top))
+ (dixScreenOrigins[i].x == left && dixScreenOrigins[i].y < top))
{
left = dixScreenOrigins[i].x;
top = dixScreenOrigins[i].y;
@@ -570,17 +569,20 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
darwinMainScreenX = left;
darwinMainScreenY = top;
+
+ DEBUG_LOG("top = %d, left=%d\n", top, left);
/* Shift all screens so that there is a screen whose top left
- is at X11 (0,0) and at global screen coordinate
- (darwinMainScreenX, darwinMainScreenY). */
+ * is at X11 (0,0) and at global screen coordinate
+ * (darwinMainScreenX, darwinMainScreenY).
+ */
if (darwinMainScreenX != 0 || darwinMainScreenY != 0) {
for (i = 0; i < pScreenInfo->numScreens; i++) {
dixScreenOrigins[i].x -= darwinMainScreenX;
dixScreenOrigins[i].y -= darwinMainScreenY;
- /* ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
- i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); */
+ DEBUG_LOG("Screen %d placed at X11 coordinate (%d,%d).\n",
+ i, dixScreenOrigins[i].x, dixScreenOrigins[i].y);
}
}
}
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 22caa1c2e..4e5374dd1 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -152,7 +152,8 @@ displayScreenBounds(CGDirectDisplayID id, Bool remove_menubar)
(int)frame.origin.x, (int)frame.origin.y);
/* Remove menubar to help standard X11 window managers. */
- if (remove_menubar && !quartzHasRoot && id == 0) {
+ if (remove_menubar && !quartzHasRoot &&
+ frame.origin.x == 0 && frame.origin.y == 0) {
frame.origin.y += aquaMenuBarHeight;
frame.size.height -= aquaMenuBarHeight;
}
@@ -200,6 +201,9 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
*width = unionRect.size.width;
*height = unionRect.size.height;
+ DEBUG_LOG(" screen union origin: (%d,%d) size: (%d,%d).\n",
+ *x, *y, *width, *height);
+
/* Tell PseudoramiX about the real screens. */
for (i = 0; i < displayCount; i++)
{
@@ -228,7 +232,7 @@ xprDisplayInit(void)
{
CGDisplayCount displayCount;
- // ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
+ DEBUG_LOG("");
CGGetActiveDisplayList(0, NULL, &displayCount);
@@ -264,6 +268,8 @@ xprAddScreen(int index, ScreenPtr pScreen)
{
DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
int depth = darwinDesiredDepth;
+
+ DEBUG_LOG("index=%d depth=%d\n", index, depth);
if(depth == -1) {
depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);