diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2013-02-24 15:45:52 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu.herrb@laas.fr> | 2013-02-24 15:49:36 +0100 |
commit | 3c7d5a1f6c188eed12275ff6884a6d8fd1669ffd (patch) | |
tree | 5b72ec229f01b3cccf52935a3c9eb7998addced6 /xserver/xkb/xkbAccessX.c | |
parent | bf92adb413c678cf9583c52c3ba70eb470aa5164 (diff) |
Merge server-1.13.3rc1 branch from X.Org.
up to e604b19fc54fee839bbe2d66930b36108ff03950
Diffstat (limited to 'xserver/xkb/xkbAccessX.c')
-rw-r--r-- | xserver/xkb/xkbAccessX.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/xserver/xkb/xkbAccessX.c b/xserver/xkb/xkbAccessX.c index 21df85d94..13051e034 100644 --- a/xserver/xkb/xkbAccessX.c +++ b/xserver/xkb/xkbAccessX.c @@ -723,23 +723,27 @@ 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))) + 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))) { + DeviceIntPtr xtest_device; + + xtest_device = GetXTestDevice(GetMaster(dev, MASTER_POINTER)); + if (button_is_down(xtest_device, ev->device_event.detail.button, BUTTON_PROCESSED)) XkbFakeDeviceButton(dev, FALSE, event->detail.key); } } + if (xkbi) + xkbi->lockedPtrButtons &= ~(1 << (event->detail.key & 0x7)); + changed |= XkbPointerButtonMask; } |