Currently on 1.7 and 1.8, when OSX's display configuration changes, the server 
is left in a state where input pointer events get clipped to the old display 
region.  This can be worked around by running 'xinput test pointer' after the 
reconfig.

I'm trying to figure out how to best solve this problem.  There are two places 
where this clipping is occuring.  First is based on the VCP's miPointer's 
limits.  The second is based on the VCP's sprite limits.

The following patch "fixes" the problem, but I'm sure there is a better way to 
handle this.  Please comment.

Thanks,
Jeremy



http://xquartz.macosforge.org/trac/ticket/346

Signed-off-by: Jeremy Huddleston <[email protected]>
---
 hw/xquartz/quartz.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

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);
 
-- 
1.6.2

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to