summaryrefslogtreecommitdiff
path: root/xkb/xkbAccessX.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkb/xkbAccessX.c')
-rw-r--r--xkb/xkbAccessX.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 963150294..13051e034 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -732,8 +732,13 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse)
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);
+ 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)