summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-07-01 23:46:27 -0400
committerKeith Packard <keithp@keithp.com>2010-07-01 23:46:27 -0400
commitb90faa71567c4461b28515756ba5c1e6286dda16 (patch)
tree61cd193d6967e0a571dd5f67594e226cd3226669
parent9fb0785449b287ba1998e08613b3c2102ec24842 (diff)
Revert "xkb: merge lockedPtrButtons state from all attached SDs."
Preparing to merge Peter's branch. This reverts commit 6052710670953b43b4fff5d101b727163fcb1187.
-rw-r--r--include/xkbsrv.h3
-rw-r--r--xkb/xkbAccessX.c18
-rw-r--r--xkb/xkbActions.c10
-rw-r--r--xkb/xkbUtils.c26
4 files changed, 1 insertions, 56 deletions
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 956b2249b..5847e6395 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -924,9 +924,6 @@ extern int XkbGetEffectiveGroup(
XkbStatePtr /* xkbstate */,
CARD8 /* keycode */);
-extern void XkbMergeLockedPtrBtns(
- DeviceIntPtr /* master */);
-
#include "xkbfile.h"
#include "xkbrules.h"
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 451c7979f..b5486b73b 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -707,24 +707,8 @@ 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;
}
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index b4b839558..c5030d04d 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -633,16 +633,6 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi,
break;
}
xkbi->lockedPtrButtons&= ~(1<<button);
-
- if (IsMaster(xkbi->device))
- {
- XkbMergeLockedPtrBtns(xkbi->device);
- /* One SD still has lock set, don't post event */
- if ((xkbi->lockedPtrButtons & (1 << button)) != 0)
- break;
- }
-
- /* fallthrough */
case XkbSA_PtrBtn:
XkbFakeDeviceButton(xkbi->device, 0, button);
break;
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 14dc784b8..3344e5088 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -2094,29 +2094,3 @@ XkbGetEffectiveGroup(XkbSrvInfoPtr xkbi, XkbStatePtr xkbState, CARD8 keycode)
return effectiveGroup;
}
-
-/* Merge the lockedPtrButtons from all attached SDs for the given master
- * device into the MD's state.
- */
-void
-XkbMergeLockedPtrBtns(DeviceIntPtr master)
-{
- DeviceIntPtr d = inputInfo.devices;
- XkbSrvInfoPtr xkbi = NULL;
-
- if (!IsMaster(master))
- return;
-
- if (!master->key)
- return;
-
- xkbi = master->key->xkbInfo;
- xkbi->lockedPtrButtons = 0;
-
- for (; d; d = d->next) {
- if (IsMaster(d) || GetMaster(d, MASTER_KEYBOARD) != master || !d->key)
- continue;
-
- xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons;
- }
-}