XQuartz: More multi-monitor work... reverted Ben's workaround (worked for side-by-side only) and added more debugging.
This commit is contained in:
parent
9112f29043
commit
515b8b855a
@ -535,8 +535,7 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
|
|||||||
/* Find leftmost screen. If there's a tie, take the topmost of the two. */
|
/* Find leftmost screen. If there's a tie, take the topmost of the two. */
|
||||||
for (i = 1; i < pScreenInfo->numScreens; i++) {
|
for (i = 1; i < pScreenInfo->numScreens; i++) {
|
||||||
if (dixScreenOrigins[i].x < left ||
|
if (dixScreenOrigins[i].x < left ||
|
||||||
(dixScreenOrigins[i].x == left &&
|
(dixScreenOrigins[i].x == left && dixScreenOrigins[i].y < top))
|
||||||
dixScreenOrigins[i].y < top))
|
|
||||||
{
|
{
|
||||||
left = dixScreenOrigins[i].x;
|
left = dixScreenOrigins[i].x;
|
||||||
top = dixScreenOrigins[i].y;
|
top = dixScreenOrigins[i].y;
|
||||||
@ -546,16 +545,19 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
|
|||||||
darwinMainScreenX = left;
|
darwinMainScreenX = left;
|
||||||
darwinMainScreenY = top;
|
darwinMainScreenY = top;
|
||||||
|
|
||||||
|
DEBUG_LOG("top = %d, left=%d\n", top, left);
|
||||||
|
|
||||||
/* Shift all screens so that there is a screen whose top left
|
/* Shift all screens so that there is a screen whose top left
|
||||||
is at X11 (0,0) and at global screen coordinate
|
* is at X11 (0,0) and at global screen coordinate
|
||||||
(darwinMainScreenX, darwinMainScreenY). */
|
* (darwinMainScreenX, darwinMainScreenY).
|
||||||
|
*/
|
||||||
|
|
||||||
if (darwinMainScreenX != 0 || darwinMainScreenY != 0) {
|
if (darwinMainScreenX != 0 || darwinMainScreenY != 0) {
|
||||||
for (i = 0; i < pScreenInfo->numScreens; i++) {
|
for (i = 0; i < pScreenInfo->numScreens; i++) {
|
||||||
dixScreenOrigins[i].x -= darwinMainScreenX;
|
dixScreenOrigins[i].x -= darwinMainScreenX;
|
||||||
dixScreenOrigins[i].y -= darwinMainScreenY;
|
dixScreenOrigins[i].y -= darwinMainScreenY;
|
||||||
/* ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
|
DEBUG_LOG("Screen %d placed at X11 coordinate (%d,%d).\n",
|
||||||
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); */
|
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,8 @@ displayScreenBounds(CGDirectDisplayID id, Bool remove_menubar)
|
|||||||
(int)frame.origin.x, (int)frame.origin.y);
|
(int)frame.origin.x, (int)frame.origin.y);
|
||||||
|
|
||||||
/* Remove menubar to help standard X11 window managers. */
|
/* 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.origin.y += aquaMenuBarHeight;
|
||||||
frame.size.height -= aquaMenuBarHeight;
|
frame.size.height -= aquaMenuBarHeight;
|
||||||
}
|
}
|
||||||
@ -203,6 +204,9 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
|
|||||||
*width = unionRect.size.width;
|
*width = unionRect.size.width;
|
||||||
*height = unionRect.size.height;
|
*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. */
|
/* Tell PseudoramiX about the real screens. */
|
||||||
for (i = 0; i < displayCount; i++)
|
for (i = 0; i < displayCount; i++)
|
||||||
{
|
{
|
||||||
@ -231,7 +235,7 @@ xprDisplayInit(void)
|
|||||||
{
|
{
|
||||||
CGDisplayCount displayCount;
|
CGDisplayCount displayCount;
|
||||||
|
|
||||||
// ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
|
DEBUG_LOG("");
|
||||||
|
|
||||||
CGGetActiveDisplayList(0, NULL, &displayCount);
|
CGGetActiveDisplayList(0, NULL, &displayCount);
|
||||||
|
|
||||||
@ -270,6 +274,8 @@ xprAddScreen(int index, ScreenPtr pScreen)
|
|||||||
DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
|
DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
|
||||||
int depth = darwinDesiredDepth;
|
int depth = darwinDesiredDepth;
|
||||||
|
|
||||||
|
DEBUG_LOG("index=%d depth=%d\n", index, depth);
|
||||||
|
|
||||||
if(depth == -1) {
|
if(depth == -1) {
|
||||||
depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
|
depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
|
||||||
//dfb->depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
|
//dfb->depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
|
||||||
|
Loading…
Reference in New Issue
Block a user