From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Feb 4 17:00:12 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5330F1065672 for ; Fri, 4 Feb 2011 17:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 01E418FC18 for ; Fri, 4 Feb 2011 17:00:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p14H0BnE062440 for ; Fri, 4 Feb 2011 17:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p14H0B3m062439; Fri, 4 Feb 2011 17:00:11 GMT (envelope-from gnats) Resent-Date: Fri, 4 Feb 2011 17:00:11 GMT Resent-Message-Id: <201102041700.p14H0B3m062439@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Brian Feldman Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4267D106564A for ; Fri, 4 Feb 2011 16:57:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 2843E8FC15 for ; Fri, 4 Feb 2011 16:57:24 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p14GvOEx076794 for ; Fri, 4 Feb 2011 16:57:24 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p14GvNN5076793; Fri, 4 Feb 2011 16:57:23 GMT (envelope-from nobody) Message-Id: <201102041657.p14GvNN5076793@red.freebsd.org> Date: Fri, 4 Feb 2011 16:57:23 GMT From: Brian Feldman To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/154510: xorg servers have Motif-crippling bug X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2011 17:00:12 -0000 >Number: 154510 >Category: ports >Synopsis: xorg servers have Motif-crippling bug >Confidential: no >Severity: critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Feb 04 17:00:11 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Brian Feldman >Release: >Organization: >Environment: >Description: This has been driving me crazy for a long time and I tracked it down to a bug that was fixed in an older xorg-server release but not the later releases (it did eventually get merged forward, though.) All Motif applications have unusable right-click menus because the cursor stays trapped in them until you kill the program entirely. I confirmed this makes Motif usable for right-click menus again. >How-To-Repeat: Right click in a Motif application that brings up a menu; cursor is trapped. >Fix: patch from the Xorg project. anything else that builds an xorg-server needs it, too, Xnest, etc. Patch attached with submission follows: >From 873ef3430e92b0756c0dbe5033f6aec38a20d6ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 16 Dec 2009 13:43:22 +1000 Subject: [PATCH] dix: if owner-events is true for passive grabs, add the window mask (#25400) A client requesting a GrabModeSync button grab, owner-events true, with only the ButtonRelease mask set would never receive the press event even if the grab window had the ButtonPress mask set. The protocol requires that if owner-events is true, then the delivery mask is the combination of the grab mask + the window event mask. X.Org Bug 25400 Signed-off-by: Peter Hutterer --- dix/events.c | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/dix/events.c b/dix/events.c index 7e0867c..12b12a8 100644 --- dix/events.c +++ dix/events.c @@ -3590,6 +3590,8 @@ CheckPassiveGrabsOnWindow( xE = &core; count = 1; mask = grab->eventMask; + if (grab->ownerEvents) + mask |= pWin->eventMask; } else if (match & XI2_MATCH) { rc = EventToXI2((InternalEvent*)event, &xE); @@ -3611,6 +3613,24 @@ CheckPassiveGrabsOnWindow( 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); @@ -3622,6 +3642,22 @@ CheckPassiveGrabsOnWindow( 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); -- 1.6.5.2 >Release-Note: >Audit-Trail: >Unformatted: