diff options
Diffstat (limited to 'xorg-server/xkb/xkbAccessX.c')
-rw-r--r-- | xorg-server/xkb/xkbAccessX.c | 18 |
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;
}
|