summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-09-05 16:19:45 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-09-05 16:19:45 +0930
commitc4fff050836feeef8390b7197f1de39af2997811 (patch)
treefbe870b70d8a6bab2ab23c90e1e77843f94cbd4d
parentbfe6b4d2d9952a80f8dbc63eec974ef894e5c226 (diff)
Revert "Input: Fix stuck modifiers (bug #11683)"
This reverts commit 6b055e5d9751e3679ff98065e43225ec8a960053. MPX relies on the XI event being delivered before the core event. Device grabs break, amongst other things. I guess stuck modifiers need to be fixed some other way. Conflicts: dix/getevents.c
-rw-r--r--dix/getevents.c56
1 files changed, 26 insertions, 30 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index bcbc00bcb..e88c56c5f 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -451,14 +451,6 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
ms = GetTimeInMillis();
- if (pDev->coreEvents) {
- xEvent* evt = events->event;
- evt->u.keyButtonPointer.time = ms;
- evt->u.u.type = type;
- evt->u.u.detail = key_code;
- events++;
- }
-
kbp = (deviceKeyButtonPointer *) events->event;
kbp->time = ms;
kbp->deviceid = pDev->id;
@@ -476,6 +468,12 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
num_valuators, valuators);
}
+ if (pDev->coreEvents) {
+ events->event->u.keyButtonPointer.time = ms;
+ events->event->u.u.type = type;
+ events->event->u.u.detail = key_code;
+ }
+
return numEvents;
}
@@ -677,28 +675,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
pDev->valuator->lastx = x;
pDev->valuator->lasty = y;
- /* for some reason inputInfo.pointer does not have coreEvents set */
- if (coreOnly || pDev->coreEvents) {
- xEvent* evt = events->event;
- evt->u.u.type = type;
- evt->u.keyButtonPointer.time = ms;
- evt->u.keyButtonPointer.rootX = x;
- evt->u.keyButtonPointer.rootY = y;
-
- if (type == ButtonPress || type == ButtonRelease) {
- /* We hijack SetPointerMapping to work on all core-sending
- * devices, so we use the device-specific map here instead of
- * the core one. */
- evt->u.u.detail = pDev->button->map[buttons];
- }
- else {
- evt->u.u.detail = 0;
- }
-
- events++;
- }
-
- if (!coreOnly) {
+ if (!coreOnly)
+ {
kbp = (deviceKeyButtonPointer *) events->event;
kbp->time = ms;
kbp->deviceid = pDev->id;
@@ -726,6 +704,24 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
}
}
+ /* for some reason inputInfo.pointer does not have coreEvents set */
+ if (coreOnly || pDev->coreEvents) {
+ events->event->u.u.type = type;
+ events->event->u.keyButtonPointer.time = ms;
+ events->event->u.keyButtonPointer.rootX = x;
+ events->event->u.keyButtonPointer.rootY = y;
+
+ if (type == ButtonPress || type == ButtonRelease) {
+ /* We hijack SetPointerMapping to work on all core-sending
+ * devices, so we use the device-specific map here instead of
+ * the core one. */
+ events->event->u.u.detail = pDev->button->map[buttons];
+ }
+ else {
+ events->event->u.u.detail = 0;
+ }
+ }
+
return num_events;
}