XQuartz: More multi-monitor work... reverted Ben's workaround (worked for side-by-side only) and added more debugging.

(cherry picked from commit 515b8b855a)
This commit is contained in:
Jeremy Huddleston 2008-04-24 23:48:11 -07:00
parent b65dbd350b
commit 0209e46249
2 changed files with 16 additions and 8 deletions

View File

@ -535,8 +535,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;
@ -545,17 +544,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);
}
}
}

View File

@ -153,7 +153,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;
}
@ -201,6 +202,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++)
{
@ -229,7 +233,7 @@ xprDisplayInit(void)
{
CGDisplayCount displayCount;
// ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
DEBUG_LOG("");
CGGetActiveDisplayList(0, NULL, &displayCount);
@ -265,6 +269,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);