summaryrefslogtreecommitdiff
path: root/Xi/exevents.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-01-15 15:22:39 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-01-15 18:41:51 +1030
commit32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2 (patch)
tree9cdb35c47602bd67416a4bd2768d4e400ef22ce1 /Xi/exevents.c
parent0969a9f7497e10794a6534321c10a0e1ac680ad7 (diff)
dix: Process an input event as a single event, instead of two separate ones.
This is a significant shift in how input events are perceived. The common approach was to treat a core event as a different entity than the XI event. This could result in the XI event being delivered to a different client than the core event. This doesn't work nicely if they come from the same device. Instead, we treat an input event as a single event, that is delivered through two separate APIs. So when delivering an event, we first try the XI event, then the core event. If the window want's neither, we go to the parent and repeat. Once either core or XI has been delivered, the processing stops. Important: Different to the previous method, if a client registers for core button events, the parent window will not get XI events. This should only cause problems when you're mixing core and XI events, so don't do that! Generic events don't fit into this yet, they cause me headaches.
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r--Xi/exevents.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index d32a55fd1..23d0c47b6 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -724,32 +724,13 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
deactivateDeviceGrab = TRUE;
}
- if (sendCore)
- {
- core = *xE;
- core.u.u.type = coretype;
- }
-
if (grab)
- {
- if (sendCore) /* never deactivate from core */
- DeliverGrabbedEvent(&core, device, FALSE , 1);
DeliverGrabbedEvent(xE, device, deactivateDeviceGrab, count);
- }
else if (device->focus)
- {
- if (sendCore)
- DeliverFocusedEvent(device, &core, GetSpriteWindow(device), 1);
DeliverFocusedEvent(device, xE, GetSpriteWindow(device), count);
- }
else
- {
- if (sendCore)
- DeliverDeviceEvents(GetSpriteWindow(device), &core, NullGrab,
- NullWindow, device, 1);
DeliverDeviceEvents(GetSpriteWindow(device), xE, NullGrab, NullWindow,
device, count);
- }
if (deactivateDeviceGrab == TRUE)
(*device->deviceGrab.DeactivateGrab) (device);