aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/xkbAccessX.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-07-01 07:14:24 +0000
committermarha <marha@users.sourceforge.net>2010-07-01 07:14:24 +0000
commit1faa0f175bda9074b5f45e5e005d9a80721e3c24 (patch)
tree3a1c33cb65654d1a65979618dedf732b9ea11819 /xorg-server/xkb/xkbAccessX.c
parentaf64ef0fd32e87e56c5b293eaef39f3b9791bfbb (diff)
parent87559ccfc67a98a75fa8068066871c35caa88e30 (diff)
downloadvcxsrv-1faa0f175bda9074b5f45e5e005d9a80721e3c24.tar.gz
vcxsrv-1faa0f175bda9074b5f45e5e005d9a80721e3c24.tar.bz2
vcxsrv-1faa0f175bda9074b5f45e5e005d9a80721e3c24.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/xkb/xkbAccessX.c')
-rw-r--r--xorg-server/xkb/xkbAccessX.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c
index be12e5d83..22178b862 100644
--- a/xorg-server/xkb/xkbAccessX.c
+++ b/xorg-server/xkb/xkbAccessX.c
@@ -707,8 +707,24 @@ DeviceEvent *event = &ev->device_event;
changed |= XkbPointerButtonMask;
}
else if (event->type == ET_ButtonRelease) {
- if (xkbi)
+ if (xkbi) {
xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7));
+
+ /* Merge this MD's lockedPtrButtons with the one of all
+ * attached slave devices.
+ * The DIX uses a merged button state for MDs, not
+ * releasing buttons until the last SD has released
+ * thenm. If we unconditionally clear the
+ * lockedPtrButtons bit on the MD, a PointerKeys button
+ * release on the SD keyboard won't generate the required fake button
+ * event on the XTEST pointer, thus never processing the
+ * button event in the DIX and the XTEST pointer's
+ * buttons stay down - result is a stuck button.
+ */
+ if (IsMaster(dev))
+ XkbMergeLockedPtrBtns(dev);
+ }
+
changed |= XkbPointerButtonMask;
}