xserver: Branch 'master' - 5 commits

Keith Packard keithp at kemper.freedesktop.org
Fri Oct 26 17:21:48 PDT 2012


 autogen.sh                  |    4 +++-
 dix/devices.c               |    1 +
 dix/grabs.c                 |    2 +-
 dix/touch.c                 |   28 ++++++++++++++++++++++++++++
 hw/xfree86/common/xf86str.h |    2 +-
 include/input.h             |    1 +
 6 files changed, 35 insertions(+), 3 deletions(-)

New commits:
commit abc2ef590c7cb33ebe21726f83b7347406975f95
Merge: 0e85e5e... c5396ec...
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Oct 26 17:11:58 2012 -0700

    Merge remote-tracking branch 'whot/for-keith'

commit c5396ec05a5c6cab6608ba677f703c5227b1de13
Author: Thierry Reding <thierry.reding at avionic-design.de>
Date:   Wed Oct 17 12:11:49 2012 +0200

    xf86: Fix build against recent Linux kernel
    
    Recent Linux kernels reworked the linux/input.h header file, which is
    now part of the "user-space API". The include guard therefore has an
    additional additional _UAPI prefix.
    
    Instead of adding another case to the #ifdef, drop any include guard
    checks and instead always undefine the BUS_* definitions on Linux.
    
    Signed-off-by: Thierry Reding <thierry.reding at avionic-design.de>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 0590262..4c2d147 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -347,7 +347,7 @@ typedef struct _DriverRec {
  */
 
 /* Tolerate prior #include <linux/input.h> */
-#if defined(linux) && defined(_INPUT_H)
+#if defined(linux)
 #undef BUS_NONE
 #undef BUS_PCI
 #undef BUS_SBUS
commit 7d89eb4978a6649be22747c3de2886781e311647
Author: Colin Walters <walters at verbum.org>
Date:   Wed Jan 4 17:37:06 2012 -0500

    autogen.sh: Honor NOCONFIGURE=1
    
    (Also while we have the patient open, use exec instead of hanging
     around uselessly in waitpid)
    
    http://people.gnome.org/~walters/docs/build-api.txt
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Colin Walters <walters at verbum.org>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/autogen.sh b/autogen.sh
index 8b6f58f..dd0731a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,4 +9,6 @@ cd $srcdir
 autoreconf --force -v --install || exit 1
 cd $ORIGDIR || exit $?
 
-$srcdir/configure "$@"
+if test -z "$NOCONFIGURE"; then
+    exec $srcdir/configure "$@"
+fi
commit c0a752d2864872023216005375a6a1973fadeffe
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Tue Oct 9 03:17:49 2012 +0200

    dix: fix Ungrab action #55785
    
    UngrabAllDevices(Bool kill_client):
    If we are not going to kill the client (kill_clients false),
    we need to deactivate grabs of active clients, too.
    (If we are going to kill the client,
     no need to deactivate the grab,
     as this will be done as part of the client kill.)
    
    Fixes: X.Org Bug 55785 <http://bugs.freedesktop.org/show_bug.cgi?id=55785>
    
    Signed-off-by: Lionel Elie Mamane <lionel at mamane.lu>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/grabs.c b/dix/grabs.c
index 55bf64f..fe79674 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -179,7 +179,7 @@ UngrabAllDevices(Bool kill_client)
             continue;
         PrintDeviceGrabInfo(dev);
         client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
-        if (!client || client->clientGone)
+        if (!kill_client || !client || client->clientGone)
             dev->deviceGrab.DeactivateGrab(dev);
         if (kill_client)
             CloseDownClient(client);
commit 3b67cd26149eb991b5f015061a818af65369e668
Author: Chase Douglas <chase.douglas at canonical.com>
Date:   Thu Jun 7 14:12:06 2012 -0700

    End physically active touches when device is disabled
    
    Otherwise:
    
    * We can't end the touches while device is disabled
    * New touches after enabling the device may erroneously be mapped to old
      logical touches
    
    Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/devices.c b/dix/devices.c
index 66d4406..fd4916a 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -443,6 +443,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
     if (*prev != dev)
         return FALSE;
 
+    TouchEndPhysicallyActiveTouches(dev);
     ReleaseButtonsAndKeys(dev);
     SyncRemoveDeviceIdleTime(dev->idle_counter);
     dev->idle_counter = NULL;
diff --git a/dix/touch.c b/dix/touch.c
index 497ad7d..e64a626 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -1029,3 +1029,31 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
 
     return TouchListenerAcceptReject(dev, ti, i, mode);
 }
+
+/**
+ * End physically active touches for a device.
+ */
+void
+TouchEndPhysicallyActiveTouches(DeviceIntPtr dev)
+{
+    InternalEvent *eventlist = InitEventList(GetMaximumEventsNum());
+    int i;
+
+    OsBlockSignals();
+    mieqProcessInputEvents();
+    for (i = 0; i < dev->last.num_touches; i++) {
+        DDXTouchPointInfoPtr ddxti = dev->last.touches + i;
+
+        if (ddxti->active) {
+            int j;
+            int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id,
+                                         XI_TouchEnd, 0, NULL);
+
+            for (j = 0; j < nevents; j++)
+                mieqProcessDeviceEvent(dev, eventlist + j, NULL);
+        }
+    }
+    OsReleaseSignals();
+
+    FreeEventList(eventlist, GetMaximumEventsNum());
+}
diff --git a/include/input.h b/include/input.h
index 5747f3c..f8459b8 100644
--- a/include/input.h
+++ b/include/input.h
@@ -579,6 +579,7 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti,
                                      int listener, int mode);
 extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
                              uint32_t touchid, Window grab_window, XID *error);
+extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
 
 /* misc event helpers */
 extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);


More information about the xorg-commit mailing list