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



commit 4aec3af61760edc405b827f97fc7687f989a2bf9
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 d808e69..b9d0f23 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1469,14 +1469,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]