From owner-freebsd-x11@FreeBSD.ORG Mon Jan 24 17:48:46 2011 Return-Path: Delivered-To: x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FBEE106566B for ; Mon, 24 Jan 2011 17:48:46 +0000 (UTC) (envelope-from bfeldman@hammers.com) Received: from na3sys009aog105.obsmtp.com (na3sys009aog105.obsmtp.com [74.125.149.75]) by mx1.freebsd.org (Postfix) with SMTP id 15A668FC08 for ; Mon, 24 Jan 2011 17:48:45 +0000 (UTC) Received: from source ([209.85.212.45]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKTT27efvn6Ygy+cwXVRRERDmfN3ipAgi7@postini.com; Mon, 24 Jan 2011 09:48:46 PST Received: by mail-vw0-f45.google.com with SMTP id 12so1972346vws.32 for ; Mon, 24 Jan 2011 09:48:41 -0800 (PST) Received: by 10.229.250.135 with SMTP id mo7mr4027518qcb.30.1295889852278; Mon, 24 Jan 2011 09:24:12 -0800 (PST) Received: from combustion.hammers.com (173-166-181-89-washingtondc.hfc.comcastbusiness.net [173.166.181.89]) by mx.google.com with ESMTPS id w12sm8367008qco.32.2011.01.24.09.24.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 09:24:11 -0800 (PST) Message-ID: <4D3DB5B9.1040209@hammers.com> Date: Mon, 24 Jan 2011 12:24:09 -0500 From: Brian Fundakowski Feldman User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.10) Gecko/20100630 Thunderbird/3.0.5 MIME-Version: 1.0 To: x11@FreeBSD.org Content-Type: multipart/mixed; boundary="------------030606020609060108030703" Cc: Subject: xorg-server Motif-right-click-menu fix X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2011 17:48:46 -0000 This is a multi-part message in MIME format. --------------030606020609060108030703 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. Would you mind turning this into xorg-server-1.7.5_1,1? Thank you! -- Brian Fundakowski Feldman --------------030606020609060108030703 Content-Type: text/plain; name="patch-dix-events.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-dix-events.c" >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 --------------030606020609060108030703--