[gtk+] gtkmain: Ensure to emit real GDK_LEAVE_NOTIFY events.



commit e0a3c9d2deb31beff5aaeb0aabc77bee0e0154bf
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Sep 19 18:18:07 2017 +0200

    gtkmain: Ensure to emit real GDK_LEAVE_NOTIFY events.
    
    If we got a GDK_LEAVE_NOTIFY event from GDK, we would reset the
    GtkPointerFocus, but the event would be silently consumed.

 gtk/gtkmain.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 7162719..40b939f 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1494,6 +1494,10 @@ handle_pointing_event (GdkEvent *event)
     case GDK_TOUCH_END:
     case GDK_TOUCH_CANCEL:
       old_target = update_pointer_focus_state (toplevel, event, NULL);
+
+      if (event->type == GDK_LEAVE_NOTIFY)
+        gtk_synthesize_crossing_events (toplevel, old_target, NULL,
+                                        event, event->crossing.mode);
       break;
     case GDK_ENTER_NOTIFY:
       if (event->crossing.mode == GDK_CROSSING_GRAB ||


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