From owner-freebsd-x11@FreeBSD.ORG Tue Apr 24 15:30:20 2012 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 A13B0106566B for ; Tue, 24 Apr 2012 15:30:20 +0000 (UTC) (envelope-from miwi.freebsd@googlemail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6FD368FC08 for ; Tue, 24 Apr 2012 15:30:20 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so264141pbc.13 for ; Tue, 24 Apr 2012 08:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:date:from:to:subject:message-id:in-reply-to:references :reply-to:organization:x-mailer:mime-version:content-type :content-transfer-encoding; bh=0/ZC0VUq7RxMMOjL4XohnCZ1B3wkbMXuoL71CzrWjos=; b=T6MRJlqpRq1tSYXuCL9Mh7eRiyb80Nb7eBOU/nDGvGsArUvbgjvzI3jrmXgp3JgBlS mWxvLpMtjvCNiyO+GRCu8oAio0HD0Zu2uzAmVI9Nf59pMiDRgA3CQnNq0OcIpHgxalbe EPBLBRWp7cML49ZxND2WBx9Cu+zww6uOfIrKuv+GI8uKpG83sYCZJ3b8cSFDEi0WndFw fTZEBghV6i6/iq8ti4iIXkZvLLPy7LEQzN+6B1P1I+c3vbaORp9UcnvyEBFRvVnVlV4R t5v5ecbxct2B7JTdGcemK4LFKk+86ZH4gi7sHlj0OMd8tMfp7hsrO8tEaeXurDHGmzsG kPWw== Received: by 10.68.222.67 with SMTP id qk3mr108005pbc.137.1335281419934; Tue, 24 Apr 2012 08:30:19 -0700 (PDT) Received: from miwifbsd.dyndns.org ([210.195.32.201]) by mx.google.com with ESMTPS id ot5sm11444781pbb.26.2012.04.24.08.30.17 (version=SSLv3 cipher=OTHER); Tue, 24 Apr 2012 08:30:19 -0700 (PDT) Sender: Martin Wilke Date: Tue, 24 Apr 2012 23:27:05 +0000 From: Martin Wilke To: freebsd-x11@freebsd.org Message-ID: <20120424232705.0a99e350.miwi@FreeBSD.org> In-Reply-To: <20120424110317.GA60583@lorvorc.mips.inka.de> References: <20120424110317.GA60583@lorvorc.mips.inka.de> Organization: FreeBSD X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: xorg-server: restore patch-dix-events.c X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: miwi@FreeBSD.org List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 15:30:20 -0000 On Tue, 24 Apr 2012 13:03:17 +0200 Christian Weisgerber wrote: Please go ahead. Thanks for that. - Martin > In the Xorg 7.5.2 update, patch-dix-events.c was lost, although it > is still required for xorg-server-1.7.7. > > ----> > Revert "dix: use the event mask of the grab for TryClientEvents." > http://cgit.freedesktop.org/xorg/xserver/commit/?id=018c878e9495b21146c8f38617fdd1bf6d8cc73b > > This fixes delivery of button press events to clients. > In particular, it fixes irrecoverable focus loss in mwm(1). > <---- > > Unless there are objections I will commit this in 24 hours. > > Index: Makefile > =================================================================== > RCS file: /home/pcvs/ports/x11-servers/xorg-server/Makefile,v > retrieving revision 1.85 > diff -u -r1.85 Makefile > --- Makefile 21 Apr 2012 17:03:31 -0000 1.85 > +++ Makefile 24 Apr 2012 11:01:02 -0000 > @@ -31,8 +31,9 @@ > ${FILESDIR}/extra-hw_dmx_glxProxy_glxcmds.h > .else > XORG_VERSION= 1.7.7 > -XORG_REVISION= 4 > +XORG_REVISION= 5 > PLIST_SUB+= OLD="" NEW="@comment " > +EXTRA_PATCHES+= ${FILESDIR}/extra-dix_events.c > EXTRA_PATCHES+= ${FILESDIR}/extra-include_eventstr.h > EXTRA_PATCHES+= ${FILESDIR}/extra-patch-os-utils.c > .endif > Index: files/extra-dix_events.c > =================================================================== > RCS file: files/extra-dix_events.c > diff -N files/extra-dix_events.c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/extra-dix_events.c 24 Apr 2012 11:01:02 -0000 > @@ -0,0 +1,89 @@ > +--- dix/events.c.orig 2010-05-04 02:47:57.000000000 +0200 > ++++ dix/events.c 2012-04-24 12:59:22.000000000 +0200 > +@@ -3440,7 +3440,6 @@ CheckPassiveGrabsOnWindow( > + { > + DeviceIntPtr gdev; > + XkbSrvInfoPtr xkbi = NULL; > +- Mask mask = 0; > + > + gdev= grab->modifierDevice; > + if (grab->grabtype == GRABTYPE_CORE) > +@@ -3555,9 +3554,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); > +@@ -3569,34 +3565,6 @@ CheckPassiveGrabsOnWindow( > + continue; > + } > + 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->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); > +@@ -3607,23 +3575,6 @@ CheckPassiveGrabsOnWindow( > + "(%d, %d).\n", device->name, > event->type, rc); > + 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); +@@ -3632,7 +3583,8 @@ CheckPassiveGrabsOnWindow( > + { > + FixUpEventFromWindow(device, xE, grab->window, > None, TRUE); > + > +- TryClientEvents(rClient(grab), device, xE, count, > mask, ++ TryClientEvents(rClient(grab), device, xE, > count, ++ > GetEventFilter(device, xE), > + GetEventFilter(device, xE), > grab); > + } > + -- +------------------oOO--(_)--OOo----------------+ Facebook: miwi1 Twitter: miwi_ With best Regards, Martin Wilke (miwi_(at)_FreeBSD.org)