summaryrefslogtreecommitdiff
path: root/dix/events.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2012-01-31 11:06:21 -0800
committerJeremy Huddleston <jeremyhu@apple.com>2012-02-22 21:15:41 -0800
commit38000e7d1f958f5944e641de3e716944a5876d41 (patch)
tree52aa27c9a3dcff11cab0b3cba22782cd9260dd72 /dix/events.c
parentcb6a32da27f09261c4d561c19d1877c750d98cc3 (diff)
Revert "dix: don't XWarpPointer through the last slave anymore (#38313)"
This reverts commit 2bfb802839688ecf328119c4c6979390fc60348d. This commit caused a regression. See: http://xquartz.macosforge.org/trac/ticket/517#comment:10 Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/events.c')
-rw-r--r--dix/events.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/dix/events.c b/dix/events.c
index 9998845d0..924479582 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3449,21 +3449,16 @@ XineramaWarpPointer(ClientPtr client)
{
WindowPtr dest = NULL;
int x, y, rc;
- DeviceIntPtr dev;
- SpritePtr pSprite;
+ SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
REQUEST(xWarpPointerReq);
+
if (stuff->dstWid != None) {
rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess);
if (rc != Success)
return rc;
}
-
- /* Post through the XTest device */
- dev = PickPointer(client);
- dev = GetXTestDevice(dev);
- pSprite = dev->spriteInfo->sprite;
x = pSprite->hotPhys.x;
y = pSprite->hotPhys.y;
@@ -3513,9 +3508,9 @@ XineramaWarpPointer(ClientPtr client)
else if (y >= pSprite->physLimits.y2)
y = pSprite->physLimits.y2 - 1;
if (pSprite->hotShape)
- ConfineToShape(dev, pSprite->hotShape, &x, &y);
+ ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
- XineramaSetCursorPosition(dev, x, y, TRUE);
+ XineramaSetCursorPosition(PickPointer(client), x, y, TRUE);
return Success;
}
@@ -3533,7 +3528,7 @@ ProcWarpPointer(ClientPtr client)
WindowPtr dest = NULL;
int x, y, rc;
ScreenPtr newScreen;
- DeviceIntPtr dev, tmp, xtest_dev = NULL;
+ DeviceIntPtr dev, tmp;
SpritePtr pSprite;
REQUEST(xWarpPointerReq);
@@ -3546,13 +3541,11 @@ ProcWarpPointer(ClientPtr client)
rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess);
if (rc != Success)
return rc;
- if (IsXTestDevice(tmp, dev))
- xtest_dev = tmp;
}
}
- /* Use the XTest device to actually move the pointer */
- dev = xtest_dev;
+ if (dev->lastSlave)
+ dev = dev->lastSlave;
pSprite = dev->spriteInfo->sprite;
#ifdef PANORAMIX