summaryrefslogtreecommitdiff
path: root/Xi/exevents.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-08-01 14:14:02 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-09 13:26:47 +1000
commit35ec24cf245e5ef676e98a0bf7c77296a3f1ff63 (patch)
treeb0371fc133f2749fbeaec2e433ad517f4066ac69 /Xi/exevents.c
parentfc16917ad6f0d2722bfb5c5eeca955dd3bc4125a (diff)
input: replace remaining GetPairedDevice() with GetMaster()
Wherever it's obvious which device we need (keyboard or pointer), use GetMaster() instead of GetPairedDevice(). It is more reliable in actually getting the device type we want. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r--Xi/exevents.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index edf2c393f..53db03629 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -104,7 +104,7 @@ int
XIShouldNotify(ClientPtr client, DeviceIntPtr dev)
{
DeviceIntPtr current_ptr = PickPointer(client);
- DeviceIntPtr current_kbd = GetPairedDevice(current_ptr);
+ DeviceIntPtr current_kbd = GetMaster(current_ptr, KEYBOARD_OR_FLOAT);
if (dev == current_kbd || dev == current_ptr)
return 1;
@@ -903,13 +903,13 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
if (IsPointerDevice(device))
{
- kbd = GetPairedDevice(device);
+ kbd = GetMaster(device, KEYBOARD_OR_FLOAT);
mouse = device;
if (!kbd->key) /* can happen with floating SDs */
kbd = NULL;
} else
{
- mouse = GetPairedDevice(device);
+ mouse = GetMaster(device, POINTER_OR_FLOAT);
kbd = device;
if (!mouse->valuator || !mouse->button) /* may be float. SDs */
mouse = NULL;