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>
This commit is contained in:
Peter Hutterer 2011-12-14 13:21:03 +10:00
parent 190a6f45ee
commit 0b9d2e426d

View File

@ -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)
{