diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-03 12:18:17 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-03 12:19:05 +1000 |
commit | 08fd2ae652883393ecff6f3d5177e63408d58472 (patch) | |
tree | f8b5bc054159dd7180512071462aa99ad56748ba /dix/events.c | |
parent | a1d1dd06f8f91c1d1802f7581a4ba7568b85e69c (diff) |
dix: use GetMaster in PickPointer and PickKeyboard.
GetMaster is more reliable than GetPairedDevice, it always returns the
keyboard/pointer if desired, even if the wrong device was passed in.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dix/events.c b/dix/events.c index 26a9bf12f..3a0c3a322 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5733,8 +5733,7 @@ PickPointer(ClientPtr client) GrabPtr grab = it->deviceGrab.grab; if (grab && grab->grabtype == GRABTYPE_CORE && SameClient(grab, client)) { - if (!IsPointerDevice(it)) - it = GetPairedDevice(it); + it = GetMaster(it, MASTER_POINTER); return it; /* Always return a core grabbed device */ } } @@ -5763,7 +5762,7 @@ DeviceIntPtr PickKeyboard(ClientPtr client) { DeviceIntPtr ptr = PickPointer(client); - DeviceIntPtr kbd = ptr->spriteInfo->paired; + DeviceIntPtr kbd = GetMaster(ptr, MASTER_KEYBOARD); if (!kbd) { |