[gtk+/wip/carlosg/event-delivery: 63/75] gtkmain: Ignore GDK_CROSSING_GRAB/UNGRAB crossing events for picking purposes



commit aae77593b438069538b12916a3b33e612d44df8a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu May 4 13:45:30 2017 +0200

    gtkmain: Ignore GDK_CROSSING_GRAB/UNGRAB crossing events for picking purposes
    
    Especially with owner_events=TRUE, this doesn't mean anything for picking, as
    events will be reported as usual inside the application.

 gtk/gtkmain.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index de7ce9c..31132d8 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1474,14 +1474,20 @@ handle_pointing_event (GdkEvent *event)
   switch (event->type)
     {
     case GDK_LEAVE_NOTIFY:
+      if (event->crossing.mode == GDK_CROSSING_GRAB ||
+          event->crossing.mode == GDK_CROSSING_UNGRAB)
+        break;
     case GDK_TOUCH_END:
     case GDK_TOUCH_CANCEL:
       old_target = update_pointer_focus_state (toplevel, event, NULL);
       break;
+    case GDK_ENTER_NOTIFY:
+      if (event->crossing.mode == GDK_CROSSING_GRAB ||
+          event->crossing.mode == GDK_CROSSING_UNGRAB)
+        break;
     case GDK_TOUCH_BEGIN:
     case GDK_TOUCH_UPDATE:
     case GDK_MOTION_NOTIFY:
-    case GDK_ENTER_NOTIFY:
       target = _gtk_toplevel_pick (toplevel, x, y, NULL, NULL);
       old_target = update_pointer_focus_state (toplevel, event, target);
       if (event->type == GDK_MOTION_NOTIFY || event->type == GDK_ENTER_NOTIFY)


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