[PATCH 07/20] dix: Simplify retrieving the master device.

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 17 19:52:14 PST 2011


GetMaster() returns NULL for floating slaves.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 07f8b05..4826781 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4277,7 +4277,7 @@ DeviceEnterLeaveEvent(
         if (BitIsOn(mouse->button->down, i))
             SetBit(&event[1], i);
 
-    kbd = (IsMaster(mouse) || mouse->u.master) ? GetPairedDevice(mouse) : NULL;
+    kbd = GetMaster(mouse, MASTER_KEYBOARD);
     if (kbd && kbd->key)
     {
         event->mods.base_mods = kbd->key->xkbInfo->state.base_mods;
-- 
1.7.4



More information about the xorg-devel mailing list