dix: avoid using the VCP as modifier device

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@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Peter Hutterer 2011-07-28 15:43:10 +10:00
parent 20a61845d3
commit 80c3704853

View File

@ -3678,7 +3678,7 @@ CheckPassiveGrabsOnWindow(
if (tempGrab.type < GenericEvent) if (tempGrab.type < GenericEvent)
{ {
grab->device = device; grab->device = device;
grab->modifierDevice = GetPairedDevice(device); grab->modifierDevice = GetMaster(device, MASTER_KEYBOARD);
} }
for (other = inputInfo.devices; other; other = other->next) for (other = inputInfo.devices; other; other = other->next)