diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2010-03-19 17:24:27 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2010-03-22 00:15:54 -0700 |
commit | 4c85c3815a6f1698e91d2043d51a716948f8c1df (patch) | |
tree | 062f9f870da8ff19ea83280318da0fe0b6a2e190 | |
parent | b226618f55a5393e32f339a963ae7aaf145c51a4 (diff) |
XQuartz: Constrain the pointer to the updated display bounds on display reconfigure.
http://xquartz.macosforge.org/trac/ticket/346
(cherry picked from commit ed31d50b5f7f25e4db986711699704e615b8afcb)
-rw-r--r-- | hw/xquartz/quartz.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 3c0420580..59107be84 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -241,6 +241,7 @@ void QuartzUpdateScreens(void) { WindowPtr pRoot; int x, y, width, height, sx, sy; xEvent e; + BoxRec bounds; if (noPseudoramiXExtension || screenInfo.numScreens != 1) { @@ -277,8 +278,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); |