Revert "Input: Fix stuck modifiers (bug #11683)"

This reverts commit 6b055e5d97.

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
This commit is contained in:
Peter Hutterer 2007-09-05 16:19:45 +09:30
parent bfe6b4d2d9
commit c4fff05083

View File

@ -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;
}