[Xquartz-changes] xserver: Branch 'master' - 2 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Fri Mar 19 17:26:32 PDT 2010


 hw/xquartz/quartz.c |   26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

New commits:
commit 6c0d1243dfe58eb7231e7f4af654b8abdf44cac6
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Mar 19 17:24:27 2010 -0700

    XQuartz: Constrain the pointer to the updated display bounds on display reconfigure.
    
    http://xquartz.macosforge.org/trac/ticket/346
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 3c04205..b29e60f 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -277,8 +277,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);
 
commit 7da4f9df9c6490e3e604c170415d5af2d8c8ff29
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Fri Mar 19 17:23:12 2010 -0700

    XQuartz: Minor cleanup
    
    Move RandRInit to where it will need to be (not yet implemented)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index c4142a8..3c04205 100644
--- a/hw/xquartz/quartz.c
+++ b/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();
 }
@@ -259,16 +264,11 @@ 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);
     
-    sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX;
-    sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
+    sx = x + darwinMainScreenX;
+    sy = y + darwinMainScreenY;
     
     /* Adjust the root window. */
     pRoot = WindowTable[pScreen->myNum];


More information about the Xquartz-changes mailing list