aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/quartz.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-02 13:46:21 +0000
committermarha <marha@users.sourceforge.net>2010-04-02 13:46:21 +0000
commit0e9df5cfcee1ab569d7b41ea1af4eab3e31f099b (patch)
tree7f9e41630a661eaab39bef9023c2661a7281af96 /xorg-server/hw/xquartz/quartz.c
parent8def4a30414ae76e228f285ccab8bba6de083d08 (diff)
downloadvcxsrv-0e9df5cfcee1ab569d7b41ea1af4eab3e31f099b.tar.gz
vcxsrv-0e9df5cfcee1ab569d7b41ea1af4eab3e31f099b.tar.bz2
vcxsrv-0e9df5cfcee1ab569d7b41ea1af4eab3e31f099b.zip
svn merge -r522:HEAD ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xquartz/quartz.c')
-rw-r--r--xorg-server/hw/xquartz/quartz.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c
index c4142a801..a611854e7 100644
--- a/xorg-server/hw/xquartz/quartz.c
+++ b/xorg-server/hw/xquartz/quartz.c
@@ -166,6 +166,11 @@ void QuartzInitOutput(
FatalError("Could not register block and wakeup handlers.");
}
+#if defined(RANDR) && !defined(FAKE_RANDR)
+ if(!QuartzRandRInit(pScreen))
+ FatalError("Failed to init RandR extension.\n");
+#endif
+
// Do display mode specific initialization
quartzProcs->DisplayInit();
}
@@ -236,6 +241,7 @@ void QuartzUpdateScreens(void) {
WindowPtr pRoot;
int x, y, width, height, sx, sy;
xEvent e;
+ BoxRec bounds;
if (noPseudoramiXExtension || screenInfo.numScreens != 1)
{
@@ -259,14 +265,12 @@ void QuartzUpdateScreens(void) {
pScreen->width = width;
pScreen->height = height;
-#ifndef FAKE_RANDR
- if(!QuartzRandRInit(pScreen))
- FatalError("Failed to init RandR extension.\n");
-#endif
-
DarwinAdjustScreenOrigins(&screenInfo);
quartzProcs->UpdateScreen(pScreen);
+ /* DarwinAdjustScreenOrigins or UpdateScreen may change dixScreenOrigins,
+ * so use it rather than x/y
+ */
sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX;
sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
@@ -277,8 +281,16 @@ void QuartzUpdateScreens(void) {
//pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND);
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
-// TODO: This is a noop in 1.6 and nuked in master... we may need to do something else now to handle it
-// DefineInitialRootWindow(pRoot);
+ /* <rdar://problem/7770779> pointer events are clipped to old display region after display reconfiguration
+ * http://xquartz.macosforge.org/trac/ticket/346
+ */
+ bounds.x1 = 0;
+ bounds.x2 = width;
+ bounds.y1 = 0;
+ bounds.y2 = height;
+ pScreen->ConstrainCursor(inputInfo.pointer, pScreen, &bounds);
+ inputInfo.pointer->spriteInfo->sprite->physLimits = bounds;
+ inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds;
DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y);