diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-27 14:21:39 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-06-08 13:57:05 +1000 |
commit | 08a7246f43c9f18079219a1c982bed558722f545 (patch) | |
tree | 30edfe03dfefe50ff2daf7664f1e83132e785702 /dix/events.c | |
parent | 0aa45c5c53e2e7ba0723f5a12c1a5f5d4baab933 (diff) |
dix: rename ProcessRawEvents to dix/events.c:DeliverRawEvent
No functional changes, prep work for future changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dix/events.c b/dix/events.c index 9063c28f5..8a4c6b9ac 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2243,6 +2243,35 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent return nondeliveries; } +void +DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device) +{ + GrabPtr grab = device->deviceGrab.grab; + + if (grab) + DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE); + else { /* deliver to all root windows */ + xEvent *xi; + int i; + int filter; + + i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi); + if (i != Success) + { + ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n", + __func__, device->name, i); + return; + } + + filter = GetEventFilter(device, xi); + + for (i = 0; i < screenInfo.numScreens; i++) + DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1, + filter, NullGrab); + free(xi); + } +} + /* If the event goes to dontClient, don't send it and return 0. if send works, return 1 or if send didn't work, return 2. Only works for core events. |