aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-06 10:08:45 +0000
committermarha <marha@users.sourceforge.net>2010-03-06 10:08:45 +0000
commitd27419efcdaaccb40e0f10c549a6b732a2f29e81 (patch)
tree115396abbfc8b11d96fd8aa1df322199c2f290bc /xorg-server/dix/events.c
parent989660b7f370532c7d4ffe9eeacc6957a31ab98f (diff)
parent93c85587c691f9b91e7c2d8bda50f453e0f6674d (diff)
downloadvcxsrv-d27419efcdaaccb40e0f10c549a6b732a2f29e81.tar.gz
vcxsrv-d27419efcdaaccb40e0f10c549a6b732a2f29e81.tar.bz2
vcxsrv-d27419efcdaaccb40e0f10c549a6b732a2f29e81.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r--xorg-server/dix/events.c63
1 files changed, 1 insertions, 62 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 7e1d9249e..a25e5589f 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -3465,7 +3465,6 @@ CheckPassiveGrabsOnWindow(
{
DeviceIntPtr gdev;
XkbSrvInfoPtr xkbi = NULL;
- Mask mask = 0;
gdev= grab->modifierDevice;
if (grab->grabtype == GRABTYPE_CORE)
@@ -3518,10 +3517,6 @@ CheckPassiveGrabsOnWindow(
(grab->confineTo->realized &&
BorderSizeNotEmpty(device, grab->confineTo))))
{
- int rc, count = 0;
- xEvent *xE = NULL;
- xEvent core;
-
event->corestate &= 0x1f00;
event->corestate |= tempGrab.modifiersDetail.exact & (~0x1f00);
grabinfo = &device->deviceGrab;
@@ -3568,62 +3563,8 @@ CheckPassiveGrabsOnWindow(
}
- if (match & CORE_MATCH)
- {
- rc = EventToCore((InternalEvent*)event, &core);
- if (rc != Success)
- {
- if (rc != BadMatch)
- ErrorF("[dix] %s: core conversion failed in CPGFW "
- "(%d, %d).\n", device->name, event->type, rc);
- continue;
- }
- xE = &core;
- count = 1;
- mask = grab->eventMask;
- } else if (match & XI2_MATCH)
- {
- rc = EventToXI2((InternalEvent*)event, &xE);
- if (rc != Success)
- {
- if (rc != BadMatch)
- ErrorF("[dix] %s: XI2 conversion failed in CPGFW "
- "(%d, %d).\n", device->name, event->type, rc);
- continue;
- }
- count = 1;
-
- /* FIXME: EventToXI2 returns NULL for enter events, so
- * dereferencing the event is bad. Internal event types are
- * aligned with core events, so the else clause is valid.
- * long-term we should use internal events for enter/focus
- * as well */
- if (xE)
- mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
- else if (event->type == XI_Enter || event->type == XI_FocusIn)
- mask = grab->xi2mask[device->id][event->type/8];
- } else
- {
- rc = EventToXI((InternalEvent*)event, &xE, &count);
- if (rc != Success)
- {
- if (rc != BadMatch)
- ErrorF("[dix] %s: XI conversion failed in CPGFW "
- "(%d, %d).\n", device->name, event->type, rc);
- continue;
- }
- mask = grab->eventMask;
- }
-
(*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
-
- if (xE)
- {
- FixUpEventFromWindow(device, xE, grab->window, None, TRUE);
-
- TryClientEvents(rClient(grab), device, xE, count, mask,
- GetEventFilter(device, xE), grab);
- }
+ DeliverGrabbedEvent((InternalEvent*)event, device, FALSE);
if (grabinfo->sync.state == FROZEN_NO_EVENT)
{
@@ -3633,8 +3574,6 @@ CheckPassiveGrabsOnWindow(
grabinfo->sync.state = FROZEN_WITH_EVENT;
}
- if (match & (XI_MATCH | XI2_MATCH))
- xfree(xE); /* on core match xE == &core */
return TRUE;
}
}