diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-12-04 15:03:37 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-12-05 17:22:18 +1000 |
commit | c4fee9d2ecd6fdd4c05b04c9f02b23f10f2938b8 (patch) | |
tree | 867898ad3d52c12b7918eae1f609a9fba82c794f /xkb | |
parent | b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 (diff) |
xkb: always post XTest button up when the physical button released (#28808)
Regression introduced by commit 2decff6393a44b56d80d53570718f95354fde454
xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP
XTest buttons must be released when a physical button is released. This was
fixed in 14327858391ebe929b806efb53ad79e789361883, but
2decff6393a44b56d80d53570718f95354fde454 changed a condition that this code
didn't get triggered anymore.
"dev" for pointer events is now always the VCP which doesn't have a xkbi
struct. So move this condition out and always trigger the XTest released for
button events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Frank Roscher <Frank-Roscher@gmx.net>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbAccessX.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 21df85d94..963150294 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -723,23 +723,22 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) changed |= XkbPointerButtonMask; } else if (event->type == ET_ButtonRelease) { - if (xkbi) { - xkbi->lockedPtrButtons &= ~(1 << (event->detail.key & 0x7)); - - if (IsMaster(dev)) { - DeviceIntPtr source; - int rc; - - rc = dixLookupDevice(&source, event->sourceid, serverClient, - DixWriteAccess); - if (rc != Success) - ErrorF("[xkb] bad sourceid '%d' on button release event.\n", - event->sourceid); - else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER))) - XkbFakeDeviceButton(dev, FALSE, event->detail.key); - } + if (IsMaster(dev)) { + DeviceIntPtr source; + int rc; + + rc = dixLookupDevice(&source, event->sourceid, serverClient, + DixWriteAccess); + if (rc != Success) + ErrorF("[xkb] bad sourceid '%d' on button release event.\n", + event->sourceid); + else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER))) + XkbFakeDeviceButton(dev, FALSE, event->detail.key); } + if (xkbi) + xkbi->lockedPtrButtons &= ~(1 << (event->detail.key & 0x7)); + changed |= XkbPointerButtonMask; } |