Fix crossing event generation

We were not properly setting the new_descendent field
in Crossing structs for GTK_CROSSING_OUT events. This
was causing extraneous ::leave signals to be emitted,
and make model buttons in popover menus flicker when
hovered.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2536
This commit is contained in:
Matthias Clasen 2020-04-02 00:39:46 -04:00
parent 8196478b19
commit fcd36e59b1

View File

@ -1317,6 +1317,7 @@ gtk_synthesize_crossing_events (GtkRoot *toplevel,
gtk_widget_handle_crossing (widget, &crossing, x, y);
if (crossing_type == GTK_CROSSING_POINTER)
gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_PRELIGHT);
prev = widget;
widget = gtk_widget_get_parent (widget);
}