xserver: Branch 'master' - 5 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Jan 9 13:21:23 PST 2012


 Xi/exevents.c      |   20 ++++++++++----------
 configure.ac       |    2 +-
 dix/eventconvert.c |    4 ++++
 3 files changed, 15 insertions(+), 11 deletions(-)

New commits:
commit e476af417d83730b11054f4e5b127ab5540bb332
Merge: f4956fa... 1460083...
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Jan 9 13:17:37 2012 -0800

    Merge remote-tracking branch 'whot/multitouch'

commit 146008358e9dd9b178bd5305bcc1680ca16c328d
Author: Chase Douglas <chase.douglas at ubuntu.com>
Date:   Thu Jan 5 16:43:40 2012 -0800

    Remove last listener on touch reject
    
    The current code short-circuits around the block that removes the
    rejecting listener if it is the only listener left. It also does not
    delete the touchpoint record if the touch has not physically ended.
    
    This change ensures the listener is removed under these circumstances.
    
    Signed-off-by: Chase Douglas <chase.douglas at ubuntu.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/Xi/exevents.c b/Xi/exevents.c
index b3b05f7..6b2db4b 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1159,13 +1159,11 @@ TouchEventRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
             DeliverTouchEvents(sourcedev, ti, tel + i, ev->resource);
     }
 
-    /* If there are no other listeners left, then don't bother sending an
-     * ownership change event to no-one; if the touchpoint is pending
+    /* If there are no other listeners left, and the touchpoint is pending
      * finish, then we can just kill it now. */
-    if (ti->num_listeners == 1)
+    if (ti->num_listeners == 1 && ti->pending_finish)
     {
-        if (ti->pending_finish)
-            TouchEndTouch(sourcedev, ti);
+        TouchEndTouch(sourcedev, ti);
         goto out;
     }
 
@@ -1178,9 +1176,9 @@ TouchEventRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
             ti->num_grabs--;
     }
 
-    /* If the current owner was removed, deliver the TouchOwnership or TouchBegin
-       event to the new owner. */
-    if (was_owner)
+    /* If the current owner was removed and there are further listeners, deliver
+     * the TouchOwnership or TouchBegin event to the new owner. */
+    if (ti->num_listeners > 0 && was_owner)
         TouchPuntToNextOwner(sourcedev, ti, ev);
 
 out:
commit e30c3c5c59abba9713cf3be532a46220aa9aeeca
Author: Chase Douglas <chase.douglas at canonical.com>
Date:   Wed Jan 4 15:50:40 2012 -0800

    Don't end touchpoint if owning client hasn't accepted/rejected
    
    A touchpoint is ended when no further processing will take place for it.
    This includes the situation where there is only one grabbing client, and
    the client receives a touch end before it has accepted/rejected the
    touchpoint.
    
    This change ensures that a delivered touch end event is converted into a
    touch update event under the above scenario. If the event is left as a
    touch end event, the touchpoint will be ended in ProcessTouchEvent().
    
    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/Xi/exevents.c b/Xi/exevents.c
index db49e31..b3b05f7 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1803,8 +1803,10 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
                 rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
             listener->state = LISTENER_HAS_END;
         }
-        if (ti->num_listeners > 1 &&
-           (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
+        if ((ti->num_listeners > 1 ||
+             (listener->type == LISTENER_GRAB &&
+              xi2mask_isset(xi2mask, dev, XI_TouchOwnership))) &&
+            (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
         {
             ev->any.type = ET_TouchUpdate;
             ev->device_event.flags |= TOUCH_PENDING_END;
commit 075a473e538efb771497b762101694b6c0c45c2b
Author: Carlos Garnacho <carlosg at gnome.org>
Date:   Tue Jan 3 02:43:40 2012 +0100

    dix: Set XITouchEmulatingPointer on events from the touch sequence emulating pointer events
    
    The internal flag is kept around, merely translated to XITouchEmulatingPointer
    when creating the XI2 events that will be delivered to the client.
    
    Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 017c871..60dc22f 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -691,6 +691,10 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
     else
         xde->flags = ev->flags;
 
+    if (IsTouchEvent((InternalEvent*)ev) &&
+        ev->flags & TOUCH_POINTER_EMULATED)
+        xde->flags |= XITouchEmulatingPointer;
+
     if (ev->key_repeat)
         xde->flags      |= XIKeyRepeat;
 
commit e8db10a033491059ddf2b4777c9fafed14c403e8
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jan 6 13:49:04 2012 +1000

    Require inputproto 2.1.99.5
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/configure.ac b/configure.ac
index 6de92b4..23a6d15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -776,7 +776,7 @@ XPROTO="xproto >= 7.0.22"
 RANDRPROTO="randrproto >= 1.2.99.3"
 RENDERPROTO="renderproto >= 0.11"
 XEXTPROTO="xextproto >= 7.1.99"
-INPUTPROTO="inputproto >= 2.1.99.3"
+INPUTPROTO="inputproto >= 2.1.99.5"
 KBPROTO="kbproto >= 1.0.3"
 FONTSPROTO="fontsproto"
 FIXESPROTO="fixesproto >= 5.0"


More information about the xorg-commit mailing list