n article < XXXX@XXXXX.COM >,
Russell Shaw < XXXX@XXXXX.COM > wrote:
I did ask and it has moved on to this stage (see below). I don't know when the
patch will appear in distros. It appears to be have been a reasonably major bug
and many at xorg were glad it was found.
I'm pressing to my next problem with a bad interaction between mwm and
arcoread. I'll keep people here informed if I make any progress.
Date: Fri, 25 Jun 2010 09:48:10 +1000
From: Peter Hutterer < XXXX@XXXXX.COM >
To: "X.Org Devel List" < XXXX@XXXXX.COM >
Cc: "Peter A. Buhr" < XXXX@XXXXX.COM >,
Keith Packard < XXXX@XXXXX.COM >,
Daniel Stone < XXXX@XXXXX.COM >
Subject: [PATCH] Revert "dix: use the event mask of the grab for
Content-Type: text/plain; charset=us-ascii
Behaviour of earlier X servers was to deliver the ButtonPress event
unconditionally, regardless of the actual event mask being set. Thus, a
GrabButton event will always deliver the button press event, a GrabKey
always the key press event, etc. Same goes for XI and XI2.
Reproducible with a simple client requesting a button grab in the form of:
XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, None, None);
On servers before MPX/XI2, the client will receive a button press and
release event. On current servers, the client receives only the release.
Clients that expect the press event to be delivered unconditionally may
leave the user with a stuck grab.
XTS test results for XGrabButton are identical with and without this patch.
This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc.
Signed-off-by: Peter Hutterer < XXXX@XXXXX.COM >
dix/events.c | 52 ++--------------------------------------------------
1 files changed, 2 insertions(+), 50 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index ae9847c..e1c3d0a 100644
@@ -3420,7 +3420,6 @@ CheckPassiveGrabsOnWindow(
XkbSrvInfoPtr xkbi = NULL;
- Mask mask = 0;
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(
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->