[gtk+/wip/carlosg/event-delivery: 67/72] gtkmain: Ensure there is a current event handling crossing events



commit de4c2f86b4f96d45e602c0e90d18e0e6f7101dc8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu May 4 13:48:27 2017 +0200

    gtkmain: Ensure there is a current event handling crossing events
    
    The "current event" will be the real one that is triggering the crossing
    notifications, not the synthesized events.

 gtk/gtkmain.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 31132d8..5a19d4c 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1618,17 +1618,17 @@ gtk_main_do_event (GdkEvent *event)
       event_widget = gtk_get_event_widget (event);
     }
 
-  if (is_pointing_event (event))
-    event_widget = handle_pointing_event (event);
-
-  if (!event_widget)
-    return;
-
   /* Push the event onto a stack of current events for
    * gtk_current_event_get().
    */
   current_events = g_list_prepend (current_events, event);
 
+  if (is_pointing_event (event))
+    event_widget = handle_pointing_event (event);
+
+  if (!event_widget)
+    goto cleanup;
+
   window_group = gtk_main_get_window_group (event_widget);
   device = gdk_event_get_device (event);
 


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