[xorg-x11-server/f17] Cherry-pick a fix for selection for TouchBegin from multiple clients

Adam Jackson ajax at fedoraproject.org
Fri Dec 14 20:05:01 UTC 2012


commit 4c241ae6dd83277949f49e5eacb8e970eaa8928a
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Dec 14 15:04:25 2012 -0500

    Cherry-pick a fix for selection for TouchBegin from multiple clients
    
    From IRC:
    
    14:07 <Jasper> ajax, airlied: can we backport
    http://cgit.freedesktop.org/xorg/xserver/commit/?id=314776eb369ca2e438907795
    to the Fedora X server? It's causing some issues for GTK+ clients.
    14:07 <ajax> i don't see why not

 ...uplicate-TouchBegin-selection-with-virtua.patch |   51 ++++++++++++++++++++
 xorg-x11-server.spec                               |    7 ++-
 2 files changed, 57 insertions(+), 1 deletions(-)
---
diff --git a/0001-Touch-Fix-duplicate-TouchBegin-selection-with-virtua.patch b/0001-Touch-Fix-duplicate-TouchBegin-selection-with-virtua.patch
new file mode 100644
index 0000000..4540440
--- /dev/null
+++ b/0001-Touch-Fix-duplicate-TouchBegin-selection-with-virtua.patch
@@ -0,0 +1,51 @@
+From 08abcc1ee0861e6845b92de3c7ee87a507007afb Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Fri, 14 Dec 2012 14:59:42 -0500
+Subject: [PATCH] Touch: Fix duplicate TouchBegin selection with virtual
+ devices
+
+Given the following scenario:
+  1) client A selects for TouchBegin on window W for device D
+  2) client B selects for TouchBegin on window W for XIAllDevices
+  3) client C selects for TouchBegin on window W with device E
+
+Step 3 will fail with BadImplementation, because attempting to look up
+XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work.
+This should succeed (or, if it was selecting for device D, fail with
+BadAccess as it would be a duplicate selection).
+
+Fix this by performing the appropriate lookup for virtual devices.
+
+[ ajax: fix up variable names for xserver 1.12 ]
+
+Signed-off-by: Daniel Stone <daniel at fooishbar.org>
+Cc: Peter Hutterer <peter.hutterer at who-t.net>
+Cc: Chase Douglas <chase.douglas at ubuntu.com>
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+ Xi/xiselectev.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
+index 43a67c8..07d3218 100644
+--- a/Xi/xiselectev.c
++++ b/Xi/xiselectev.c
+@@ -180,8 +180,13 @@ ProcXISelectEvents(ClientPtr client)
+                     if (CLIENT_ID(iclient->resource) == client->index)
+                         continue;
+ 
+-                    dixLookupDevice(&dummy, evmask->deviceid, serverClient,
+-                                    DixReadAccess);
++                    if (evmask->deviceid == XIAllDevices)
++                        dummy = inputInfo.all_devices;
++                    else if (evmask->deviceid == XIAllMasterDevices)
++                        dummy = inputInfo.all_master_devices;
++                    else
++                        dixLookupDevice(&dummy, evmask->deviceid, serverClient,
++                                        DixReadAccess);
+                     if (!dummy)
+                         return BadImplementation;       /* this shouldn't happen */
+ 
+-- 
+1.8.0.1
+
diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index 02f0fa7..0c24438 100644
--- a/xorg-x11-server.spec
+++ b/xorg-x11-server.spec
@@ -48,7 +48,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.12.4
-Release:   1%{?gitdate:.%{gitdate}}%{dist}
+Release:   2%{?gitdate:.%{gitdate}}%{dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X
@@ -116,6 +116,8 @@ Patch7020: xserver-1.12-xkb-fill-in-keycode-and-event-type-for-slow-keys-ena.pat
 # device (ie virtual machine usb tablet)
 Patch7021: 0001-dix-set-the-device-transformation-matrix.patch
 
+Patch7022: 0001-Touch-Fix-duplicate-TouchBegin-selection-with-virtua.patch
+
 %define moduledir	%{_libdir}/xorg/modules
 %define drimoduledir	%{_libdir}/dri
 %define sdkdir		%{_includedir}/xorg
@@ -584,6 +586,9 @@ rm -rf $RPM_BUILD_ROOT
 %{xserver_source_dir}
 
 %changelog
+* Fri Dec 14 2012 Adam Jackson <ajax at redhat.com> 1.12.4-2
+- Cherry-pick a fix for selection for TouchBegin from multiple clients
+
 * Wed Nov 28 2012 Adam Jackson <ajax at redhat.com> 1.12.4-1
 - xserver 1.12.4
 


More information about the scm-commits mailing list