aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/xkbAccessX.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-12-18 10:03:13 +0100
committermarha <marha@users.sourceforge.net>2012-12-18 10:03:13 +0100
commit293fd0043af7e861c9c540bebc44630d0da0bf9b (patch)
treea2579cb27e39607896c76419af5a1ba2f5964ec9 /xorg-server/xkb/xkbAccessX.c
parent840c8745518b92303d40f6834e9c616587242231 (diff)
downloadvcxsrv-293fd0043af7e861c9c540bebc44630d0da0bf9b.tar.gz
vcxsrv-293fd0043af7e861c9c540bebc44630d0da0bf9b.tar.bz2
vcxsrv-293fd0043af7e861c9c540bebc44630d0da0bf9b.zip
xserver mesa git update 18 oct 2012
xserver: 3420a7778c7d5eaa638327f31dd460554c257bb1 mesa: dc613f11ddf1f3a6e10c2d99830fb1a84fdb55b2
Diffstat (limited to 'xorg-server/xkb/xkbAccessX.c')
-rw-r--r--xorg-server/xkb/xkbAccessX.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c
index 21df85d94..13051e034 100644
--- a/xorg-server/xkb/xkbAccessX.c
+++ b/xorg-server/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;
}