main: Don't synthesize crossing events when nothing changed

This was especially bad because it was confusing the event controllers
so much, they'd emit leave + enter events every time the mouse moved.
This commit is contained in:
Benjamin Otte 2020-02-22 04:27:06 +01:00
parent a5e2275a72
commit a12e563cd2

View File

@ -1321,6 +1321,9 @@ gtk_synthesize_crossing_events (GtkRoot *toplevel,
GtkWidget *prev; GtkWidget *prev;
gboolean seen_ancestor; gboolean seen_ancestor;
if (old_target == new_target)
return;
if (old_target && new_target) if (old_target && new_target)
ancestor = gtk_widget_common_ancestor (old_target, new_target); ancestor = gtk_widget_common_ancestor (old_target, new_target);
else else