xserver: Branch 'master' - 5 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Jan 23 21:06:20 PST 2012


 dix/getevents.c    |   17 +++++++++++++----
 dix/grabs.c        |    3 ++-
 include/inputstr.h |    2 +-
 3 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit e1085a0da0b9299f48b3dc41dee5e33bf022bea5
Author: Chase Douglas <chase.douglas at canonical.com>
Date:   Wed Jan 18 19:09:21 2012 -0800

    Don't set X and Y valuators for indirect touch events
    
    For expediency, it made sense to always have the X and Y axes set for
    direct touch device event propagation. The last X and Y values are
    stored internally. However, indirect device touch event propagation
    does not depend on the touch's X and Y values. Thus, we don't need to
    set the values for every indirect touch event.
    
    On top of this, the previous X and Y values aren't stored for indirect
    touches, so without this change the axes get erroneously set to 0.
    
    Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/getevents.c b/dix/getevents.c
index 1547059..7678aa1 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1836,7 +1836,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
     default:
         return 0;
     }
-    if (!(flags & TOUCH_CLIENT_ID))
+    if (t->mode == XIDirectTouch && !(flags & TOUCH_CLIENT_ID))
     {
         if (!valuator_mask_isset(&mask, 0))
             valuator_mask_set_double(&mask, 0, valuator_mask_get_double(touchpoint.ti->valuators, 0));
commit 5201310559fe8708ba8278bdef77cdc1673fff71
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Thu Jan 19 22:40:32 2012 +1100

    UngrabAllDevices: Don't kill clients if not told to
    
    The kill_client argument to UngrabAllClients specifies if we want to
    kill the client holding the grab or just deactivate the grab.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reported-by: Julien Cristau <jcristau at debian.org>
    Reviewed-by: Cyril Brulebois <kibi at debian.org>
    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 701470c..cc2c946 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -195,7 +195,8 @@ UngrabAllDevices(Bool kill_client)
         client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
         if (!client || client->clientGone)
             dev->deviceGrab.DeactivateGrab(dev);
-        CloseDownClient(client);
+        if (kill_client)
+            CloseDownClient(client);
     }
 
     ErrorF("End list of ungrabbed devices\n");
commit 9b1e18f42a05a79d9ebec372a37b47442e397ca9
Author: Chase Douglas <chase.douglas at canonical.com>
Date:   Wed Jan 18 18:04:14 2012 -0800

    Only update pointer motion data for pointer emulated touch events
    
    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/getevents.c b/dix/getevents.c
index 2946b16..1547059 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1878,9 +1878,13 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
                              &devx, &devy, &screenx, &screeny);
 
     /* see fill_pointer_events for coordinate systems */
-    updateHistory(dev, &mask, ms);
+    if (emulate_pointer)
+        updateHistory(dev, &mask, ms);
+
     clipValuators(dev, &mask);
-    storeLastValuators(dev, &mask, 0, 1, devx, devy);
+
+    if (emulate_pointer)
+        storeLastValuators(dev, &mask, 0, 1, devx, devy);
 
     event->root = scr->root->drawable.id;
 
commit f00e5b02f5d9928cd88961e761da91b5faff1b32
Author: Chase Douglas <chase.douglas at canonical.com>
Date:   Wed Jan 18 18:04:13 2012 -0800

    Only scale direct device touch coordinates
    
    Indirect touch devices provide valuator values in pure device
    coordinates. They also don't need to be fixed up for screen crossings.
    
    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/getevents.c b/dix/getevents.c
index d0014e6..2946b16 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1867,7 +1867,12 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
     if (need_rawevent)
         set_raw_valuators(raw, &mask, raw->valuators.data);
 
-    scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
+    /* Indirect device touch coordinates are not used for cursor positioning.
+     * They are merely informational, and are provided in device coordinates.
+     * The device sprite is used for positioning instead, and it is already
+     * scaled. */
+    if (t->mode == XIDirectTouch)
+        scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny);
     if (emulate_pointer)
         scr = positionSprite(dev, Absolute, &mask,
                              &devx, &devy, &screenx, &screeny);
commit 24dc0389da3970e83e4908039957567e55f9ea05
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Jan 16 12:53:39 2012 +1000

    include: Fix comment typo
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/include/inputstr.h b/include/inputstr.h
index 518e2f4..c3297db 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -544,7 +544,7 @@ typedef struct _DeviceIntRec {
     DeviceRec	public;
     DeviceIntPtr next;
     Bool	startup;		/* true if needs to be turned on at
-				          server intialization time */
+				          server initialization time */
     DeviceProc	deviceProc;		/* proc(DevicePtr, DEVICE_xx). It is
 					  used to initialize, turn on, or
 					  turn off the device */


More information about the xorg-commit mailing list