aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-24 18:34:17 +0000
committermarha <marha@users.sourceforge.net>2010-02-24 18:34:17 +0000
commit24bc15a386e37908396c3f6088f6fc98ceaa0f46 (patch)
treec66f27ec96c869f10ef53d73ed7dd5e5e0860605 /xorg-server/dix/events.c
parent6f0a8e51f20073ea01ac5dae8e5c4d49076fc65e (diff)
downloadvcxsrv-24bc15a386e37908396c3f6088f6fc98ceaa0f46.tar.gz
vcxsrv-24bc15a386e37908396c3f6088f6fc98ceaa0f46.tar.bz2
vcxsrv-24bc15a386e37908396c3f6088f6fc98ceaa0f46.zip
Git update 24/2/2010"
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r--xorg-server/dix/events.c92
1 files changed, 38 insertions, 54 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index b5c88802c..8af8c5ac7 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1134,8 +1134,6 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
if (DeviceEventCallback)
{
DeviceEventInfoRec eventinfo;
- xEvent *xi_events = NULL;
- int count;
/* The RECORD spec says that the root window field of motion events
* must be valid. At this point, it hasn't been filled in yet, so
@@ -1146,27 +1144,12 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
* the data that GetCurrentRootWindow relies on hasn't been
* updated yet.
*/
-
if (ev->any.type == ET_Motion)
- ev->device_event.root =
- WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
-
- EventToXI(ev, &xi_events, &count);
-
- eventinfo.events = (xEventPtr)xi_events;
- eventinfo.count = count;
- CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
- xfree(xi_events);
-
- if (IsMaster(device))
- {
- xEvent core;
- EventToCore(ev, &core);
- eventinfo.events = (xEventPtr)&core;
- eventinfo.count = 1;
- CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
- }
+ ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
+ eventinfo.event = ev;
+ eventinfo.device = device;
+ CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo);
}
if (event->type == ET_Motion)
@@ -1431,11 +1414,6 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
thisDev->deviceGrab.sync.other = NullGrab;
}
- /*
- XXX: Direct slave grab won't freeze the paired master device.
- The correct thing to do would be to freeze all SDs attached to the
- paired master device.
- */
if (IsMaster(thisDev))
{
dev = GetPairedDevice(thisDev);
@@ -2502,32 +2480,36 @@ DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab,
if (mask & XI_MASK)
{
rc = EventToXI(event, &xE, &count);
- if (rc == Success &&
- XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count) == Success)
- {
- filter = GetEventFilter(dev, xE);
- FixUpEventFromWindow(dev, xE, pWin, child, FALSE);
- deliveries = DeliverEventsToWindow(dev, pWin, xE, count,
- filter, grab);
- if (deliveries > 0)
- goto unwind;
- }
+ if (rc == Success) {
+ if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count) == Success) {
+ filter = GetEventFilter(dev, xE);
+ FixUpEventFromWindow(dev, xE, pWin, child, FALSE);
+ deliveries = DeliverEventsToWindow(dev, pWin, xE, count,
+ filter, grab);
+ if (deliveries > 0)
+ goto unwind;
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: XI conversion failed in DDE (%d, %d). Skipping delivery.\n",
+ dev->name, event->any.type, rc);
}
/* Core event */
if ((mask & CORE_MASK) && IsMaster(dev) && dev->coreEvents)
{
rc = EventToCore(event, &core);
- if (rc == Success &&
- XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, &core, 1) == Success)
- {
- filter = GetEventFilter(dev, &core);
- FixUpEventFromWindow(dev, &core, pWin, child, FALSE);
- deliveries = DeliverEventsToWindow(dev, pWin, &core, 1,
- filter, grab);
- if (deliveries > 0)
- goto unwind;
- }
+ if (rc == Success) {
+ if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, &core, 1) == Success) {
+ filter = GetEventFilter(dev, &core);
+ FixUpEventFromWindow(dev, &core, pWin, child, FALSE);
+ deliveries = DeliverEventsToWindow(dev, pWin, &core, 1,
+ filter, grab);
+ if (deliveries > 0)
+ goto unwind;
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: Core conversion failed in DDE (%d, %d).\n",
+ dev->name, event->any.type, rc);
}
if ((deliveries < 0) || (pWin == stopAt) ||
@@ -3804,14 +3786,16 @@ DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window)
if (sendCore)
{
rc = EventToCore(event, &core);
- if (rc == Success &&
- XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, &core, 1) == Success)
- {
- FixUpEventFromWindow(keybd, &core, focus, None, FALSE);
- deliveries = DeliverEventsToWindow(keybd, focus, &core, 1,
- GetEventFilter(keybd, &core),
- NullGrab);
- }
+ if (rc == Success) {
+ if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, &core, 1) == Success) {
+ FixUpEventFromWindow(keybd, &core, focus, None, FALSE);
+ deliveries = DeliverEventsToWindow(keybd, focus, &core, 1,
+ GetEventFilter(keybd, &core),
+ NullGrab);
+ }
+ } else if (rc != BadMatch)
+ ErrorF("[dix] %s: core conversion failed DFE (%d, %d). Skipping delivery.\n",
+ keybd->name, event->any.type, rc);
}
unwind: