[gtk+/wip/carlosg/event-delivery: 96/104] main: Automatically (un)set PRELIGHT state on widgets



commit 8371b6b8576830a51a350a09cf12c601c99c8027
Author: Timm Bäder <mail baedert org>
Date:   Sun May 21 09:27:57 2017 +0200

    main: Automatically (un)set PRELIGHT state on widgets

 gtk/gtkmain.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 16c0bbf..209bb5f 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1337,6 +1337,11 @@ synth_crossing_for_motion (GtkWidget     *widget,
   if (other_widget)
     event->crossing.subwindow = g_object_ref (gtk_widget_get_window (other_widget));
 
+  if (enter)
+    gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE);
+  else
+    gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_PRELIGHT);
+
   gdk_event_get_coords (source, &x, &y);
   event->crossing.x = x;
   event->crossing.y = y;


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