[mutter] events: Only process Enter/Leave events when in the normal route



commit c8cc4344f24e358ed03ee2a8f4fa184a795a3f1a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Sep 16 20:28:13 2014 -0600

    events: Only process Enter/Leave events when in the normal route
    
    This prevents issues from happening when processing Enter/Leave events
    while in another kind of grab op like a Wayland popup or resizing a
    window.
    
    This can't ever really happen except outside of a race condition,
    with the X server, since we won't ever pass input events to the
    X server in any of these cases, but it can't hurt to be more correct
    about what the intended operation is.

 src/x11/events.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/x11/events.c b/src/x11/events.c
index 1584afb..ab03e77 100644
--- a/src/x11/events.c
+++ b/src/x11/events.c
@@ -848,7 +848,7 @@ handle_input_xevent (MetaDisplay *display,
   switch (input_event->evtype)
     {
     case XI_Enter:
-      if (display->grab_op == META_GRAB_OP_COMPOSITOR)
+      if (display->event_route != META_EVENT_ROUTE_NORMAL)
         break;
 
       /* Check if we've entered a window; do this even if window->has_focus to
@@ -867,7 +867,7 @@ handle_input_xevent (MetaDisplay *display,
         }
       break;
     case XI_Leave:
-      if (display->grab_op == META_GRAB_OP_COMPOSITOR)
+      if (display->event_route != META_EVENT_ROUTE_NORMAL)
         break;
 
       if (window != NULL &&
@@ -905,7 +905,6 @@ handle_input_xevent (MetaDisplay *display,
                                                    NULL,
                                                    meta_display_get_current_time_roundtrip (display));
             }
-
         }
       break;
     }


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