From owner-freebsd-x11@FreeBSD.ORG Tue May 11 13:52:01 2010 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40416106566B for ; Tue, 11 May 2010 13:52:01 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from mailrelay.rz.uni-wuerzburg.de (mailrelay.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.freebsd.org (Postfix) with ESMTP id E01FE8FC15 for ; Tue, 11 May 2010 13:52:00 +0000 (UTC) Received: from virusscan.mail (localhost [127.0.0.1]) by mailrelay.mail (Postfix) with ESMTP id 9167D5AD9A; Tue, 11 May 2010 15:27:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 8BB0D5AD47; Tue, 11 May 2010 15:27:11 +0200 (CEST) X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Received: from mail.physik.uni-wuerzburg.de (wthp192.physik.uni-wuerzburg.de [132.187.40.192]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id 64AF95CE53; Tue, 11 May 2010 15:27:11 +0200 (CEST) Received: from wep4035 ([132.187.37.35]) by mail.physik.uni-wuerzburg.de (Lotus Domino Release 8.5.1FP2HF71) with ESMTP id 2010051115270952-60865 ; Tue, 11 May 2010 15:27:09 +0200 Received: by wep4035 (sSMTP sendmail emulation); Tue, 11 May 2010 15:27:09 +0200 Date: Tue, 11 May 2010 15:27:09 +0200 From: Alexey Shuvaev To: freebsd-x11@freebsd.org Message-ID: <20100511132709.GA47986@wep4035.physik.uni-wuerzburg.de> MIME-Version: 1.0 Organization: Universitaet Wuerzburg User-Agent: Mutt/1.5.20 (2009-06-14) X-MIMETrack: Itemize by SMTP Server on domino1/uni-wuerzburg(Release 8.5.1FP2HF71 | April 5, 2010) at 05/11/2010 03:27:10 PM, Serialize by Router on domino1/uni-wuerzburg(Release 8.5.1FP2HF71 | April 5, 2010) at 05/11/2010 03:27:10 PM, Serialize complete at 05/11/2010 03:27:10 PM Content-Type: multipart/mixed; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline Cc: Tom Russo , freebsd-ports@freebsd.org Subject: Xorg 7.5 and Openmotif applications. 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: Tue, 11 May 2010 13:52:01 -0000 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello list! There seems to be a known/fixed bug in new xserver that leads to (many|all?) motif-based applications to malfunction: https://bugs.freedesktop.org/show_bug.cgi?id=25400 There are already at least 2 PRs opened against individual ports: http://www.freebsd.org/cgi/query-pr.cgi?pr=146383 http://www.freebsd.org/cgi/query-pr.cgi?pr=146380 I think it is wrong to patch applications when the fault seems to be in the server. Now I am running patched xserver with the patch pulled from the upstream git master: http://cgit.freedesktop.org/xorg/xserver/commit/?id=1c612acca8568fcdf9761d23f112adaf4d496f1b I confirm that math/grace now works OK (PR 141383). I'll watch if the patch causes any side effects (nothing so far). What about dropping attached patch to x11-servers/xorg-server/files? Cross-posting to ports@ as the bug already leaked in the individual ports' PRs. Thanks, Alexey. --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-dix-events.c" >From 1c612acca8568fcdf9761d23f112adaf4d496f1b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 17 Mar 2010 04:32:38 +0000 Subject: 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 Tested-by: Jim Ramsay Signed-off-by: Keith Packard --- diff --git a/dix/events.c b/dix/events.c index 0e9bc31..6541652 100644 --- dix/events.c.orig +++ dix/events.c @@ -3552,6 +3552,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); @@ -3573,6 +3575,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); @@ -3584,6 +3604,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); --82I3+IH0IqGh5yIs--