[PATCH] dix: don't allow overriding a grab with a different type of grab (#58255)

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 13 19:04:59 PST 2012


If a client has a core grab, don't allow re-grabbing with type XI2, etc.
This was the intent of the original commit
xorg-server-1.5.99.1-782-g09f9a86, but ineffective.

X.Org Bug 58255 <http://bugs.freedesktop.org/show_bug.cgi?id=58255>

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dix/events.c b/dix/events.c
index 31f8d87..3836d2f 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -5043,7 +5043,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev,
     grab = grabInfo->grab;
     if (grab && grab->grabtype != grabtype)
         *status = AlreadyGrabbed;
-    if (grab && !SameClient(grab, client))
+    else if (grab && !SameClient(grab, client))
         *status = AlreadyGrabbed;
     else if ((!pWin->realized) ||
              (confineTo &&
-- 
1.8.0.2



More information about the xorg-devel mailing list