[PATCH] dix: avoid using the VCP as modifier device

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 27 23:08:24 PDT 2011


Core grabs may change device when they're activated to reflect the master
they apply to. If the device is a keyboard, modifierDevice is erroneously
set to the Virtual Core Pointer.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
There are a few more cases where GetPairedDevice may return the wrong
device, but this one actually triggers a real bug (39545), even if the
correct bugfix is unrelated to this.

 dix/events.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 8a4c6b9..25ff899 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3678,7 +3678,7 @@ CheckPassiveGrabsOnWindow(
             if (tempGrab.type < GenericEvent)
             {
                 grab->device = device;
-                grab->modifierDevice = GetPairedDevice(device);
+                grab->modifierDevice = GetMaster(device, MASTER_KEYBOARD);
             }
 
             for (other = inputInfo.devices; other; other = other->next)
-- 
1.7.6



More information about the xorg-devel mailing list