[mutter] events: Do not swallow touch events on windows



commit 62e0c42803b2a9c617cb260374230bc777eaaf83
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jul 22 02:02:40 2014 +0200

    events: Do not swallow touch events on windows
    
    Those might eventually trigger a gesture into recognition.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733631

 src/core/events.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index 9781754..6668442 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -234,8 +234,15 @@ meta_display_handle_event (MetaDisplay        *display,
 
   if (window)
     {
-      /* Swallow all events on windows that come our way. */
-      bypass_clutter = TRUE;
+      if (!clutter_event_get_event_sequence (event))
+        {
+          /* Swallow all non-touch events on windows that come our way.
+           * Touch events that reach here aren't yet in an accepted state,
+           * so Clutter must see them to maybe trigger gestures into
+           * recognition.
+           */
+          bypass_clutter = TRUE;
+        }
 
       /* Under X11, we have a Sync grab and in order to send it back to
        * clients, we have to explicitly replay it.
@@ -247,7 +254,7 @@ meta_display_handle_event (MetaDisplay        *display,
         {
           bypass_wayland = TRUE;
         }
-      else
+      else if (!clutter_event_get_event_sequence (event))
         {
           MetaBackend *backend = meta_get_backend ();
           if (META_IS_BACKEND_X11 (backend))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]