summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-14 13:21:03 +1000
committerChase Douglas <chase.douglas@canonical.com>2011-12-21 10:34:10 -0800
commitb7b6d8e299fc56d02ed169fb7d02ac356bcbfa2e (patch)
treed19955e3c7a39d5f9a3ad9e2a64fc21da3c358fb
parentcdbf8f02cb767bdff2336af824acc39c9e76eb0f (diff)
Xi: split ProcessOtherEvent into ProcessDeviceEvent
No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--Xi/exevents.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 45a289add..ad9c3d6ac 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -902,13 +902,12 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
return DEFAULT;
}
+
/**
- * Main device event processing function.
- * Called from when processing the events from the event queue.
- *
+ * Process DeviceEvents and DeviceChangedEvents.
*/
-void
-ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
+static void
+ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
{
GrabPtr grab;
Bool deactivateDeviceGrab = FALSE;
@@ -919,18 +918,6 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
DeviceIntPtr mouse = NULL, kbd = NULL;
DeviceEvent *event = &ev->device_event;
- verify_internal_event(ev);
-
- if (ev->any.type == ET_RawKeyPress ||
- ev->any.type == ET_RawKeyRelease ||
- ev->any.type == ET_RawButtonPress ||
- ev->any.type == ET_RawButtonRelease ||
- ev->any.type == ET_RawMotion)
- {
- DeliverRawEvent(&ev->raw_event, device);
- return;
- }
-
if (IsPointerDevice(device))
{
kbd = GetMaster(device, KEYBOARD_OR_FLOAT);
@@ -1042,6 +1029,31 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
event->detail.key = key;
}
+/**
+ * Main device event processing function.
+ * Called from when processing the events from the event queue.
+ *
+ */
+void
+ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
+{
+ verify_internal_event(ev);
+
+ switch(ev->any.type)
+ {
+ case ET_RawKeyPress:
+ case ET_RawKeyRelease:
+ case ET_RawButtonPress:
+ case ET_RawButtonRelease:
+ case ET_RawMotion:
+ DeliverRawEvent(&ev->raw_event, device);
+ break;
+ default:
+ ProcessDeviceEvent(ev, device);
+ break;
+ }
+}
+
int
InitProximityClassDeviceStruct(DeviceIntPtr dev)
{