diff options
author | naddy <naddy@FreeBSD.org> | 2011-02-28 07:16:09 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2011-02-28 07:16:09 +0800 |
commit | 173de8f08098583baa5b83dc09e5d6229b1e1c7c (patch) | |
tree | fdadbc596573fe681a24a9eb286ec19078b74885 | |
parent | cba9ce92a6a68f6a083ce67c1923f55f95c13e2e (diff) | |
download | freebsd-ports-gnome-173de8f08098583baa5b83dc09e5d6229b1e1c7c.tar.gz freebsd-ports-gnome-173de8f08098583baa5b83dc09e5d6229b1e1c7c.tar.zst freebsd-ports-gnome-173de8f08098583baa5b83dc09e5d6229b1e1c7c.zip |
Revert "dix: use the event mask of the grab for TryClientEvents."
http://cgit.freedesktop.org/xorg/xserver/commit/?id=018c878e9495b21146c8f38617fdd1bf6d8cc73b
This fixes delivery of button press events to clients.
In particular, it fixes irrecoverable focus loss in mwm(1).
Approved by: miwi
Obtained from: Xorg upstream
-rw-r--r-- | x11-servers/xorg-server/Makefile | 1 | ||||
-rw-r--r-- | x11-servers/xorg-server/files/patch-dix-events.c | 89 |
2 files changed, 90 insertions, 0 deletions
diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile index a1012dd0a485..4a9fe928d3dd 100644 --- a/x11-servers/xorg-server/Makefile +++ b/x11-servers/xorg-server/Makefile @@ -7,6 +7,7 @@ PORTNAME= xorg-server PORTVERSION= 1.7.7 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= x11-servers MASTER_SITES= http://xorg.freedesktop.org/releases/individual/xserver/ diff --git a/x11-servers/xorg-server/files/patch-dix-events.c b/x11-servers/xorg-server/files/patch-dix-events.c new file mode 100644 index 000000000000..cda3c50eff25 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-dix-events.c @@ -0,0 +1,89 @@ +--- dix/events.c ++++ dix/events.c +@@ -3420,7 +3420,6 @@ CheckPassiveGrabsOnWindow( + { + DeviceIntPtr gdev; + XkbSrvInfoPtr xkbi = NULL; +- Mask mask = 0; + + gdev= grab->modifierDevice; + if (grab->grabtype == GRABTYPE_CORE) +@@ -3535,9 +3534,6 @@ CheckPassiveGrabsOnWindow( + } + xE = &core; + count = 1; +- mask = grab->eventMask; +- if (grab->ownerEvents) +- mask |= pWin->eventMask; + } else if (match & XI2_MATCH) + { + rc = EventToXI2((InternalEvent*)event, &xE); +@@ -3549,34 +3545,6 @@ CheckPassiveGrabsOnWindow( + 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]; +- +- if (grab->ownerEvents && wOtherInputMasks(grab->window)) +- { +- InputClientsPtr icp = +- wOtherInputMasks(grab->window)->inputClients; +- +- while(icp) +- { +- if (rClient(icp) == rClient(grab)) +- { +- int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type; +- mask |= icp->xi2mask[device->id][evtype/8]; +- break; +- } +- +- icp = icp->next; +- } +- } + } else + { + rc = EventToXI((InternalEvent*)event, &xE, &count); +@@ -3587,23 +3555,6 @@ CheckPassiveGrabsOnWindow( + "(%d, %d).\n", device->name, event->type, rc); + continue; + } +- mask = grab->eventMask; +- if (grab->ownerEvents && wOtherInputMasks(grab->window)) +- { +- InputClientsPtr icp = +- wOtherInputMasks(grab->window)->inputClients; +- +- while(icp) +- { +- if (rClient(icp) == rClient(grab)) +- { +- mask |= icp->mask[device->id]; +- break; +- } +- +- icp = icp->next; +- } +- } + } + + (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); +@@ -3612,7 +3563,8 @@ CheckPassiveGrabsOnWindow( + { + FixUpEventFromWindow(device, xE, grab->window, None, TRUE); + +- TryClientEvents(rClient(grab), device, xE, count, mask, ++ TryClientEvents(rClient(grab), device, xE, count, ++ GetEventFilter(device, xE), + GetEventFilter(device, xE), grab); + } + |