[mutter] clutter/x11: Stop tracking stage changes on crossing events



commit b98ebe60b2762dcb5f599bdb1343a628d0279e9b
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Wed Jun 26 01:09:18 2019 +0200

    clutter/x11: Stop tracking stage changes on crossing events
    
    On x11 we emulate pointer events from touch events as long as there's
    only one touchpoint on screen, this obviously leads to x11 sending us
    crossing events triggered by the emulated pointer. Now if we get a leave
    event and set the stage of the ClutterInputDevice to NULL, new touch
    events will be discarded by clutters backend because the core pointer
    doesn't have a stage associated. This means Mutter completely loses
    state of a touchpoint as soon as it crosses a shell actor.
    
    An easy reproducer for this issue is to start the four-finger-workspace
    gesture above a window and to move the pointer emulating touch outside
    of the window, this will freeze the gesture as the gesture no longer
    receives touch events.
    
    To fix this, stop tracking stage changes on crossing events and simply
    leave the ClutterInputDevice stage as-is. In our case there is only one
    stage anyway and that won't change in the future.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/423

 src/backends/x11/meta-seat-x11.c | 4 ----
 1 file changed, 4 deletions(-)
---
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index 4c2395351..8849cd3d8 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -2188,8 +2188,6 @@ meta_seat_x11_translate_event (MetaSeatX11  *seat,
 
             event->crossing.time = xev->time;
             translate_coords (stage_x11, xev->event_x, xev->event_y, &event->crossing.x, &event->crossing.y);
-
-            _clutter_input_device_set_stage (device, stage);
           }
         else
           {
@@ -2209,8 +2207,6 @@ meta_seat_x11_translate_event (MetaSeatX11  *seat,
 
             event->crossing.time = xev->time;
             translate_coords (stage_x11, xev->event_x, xev->event_y, &event->crossing.x, &event->crossing.y);
-
-            _clutter_input_device_set_stage (device, NULL);
           }
 
         _clutter_input_device_reset_scroll_info (source_device);


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