From a12e563cd2d5d33a628f1e825dcbefd6423ca11e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 22 Feb 2020 04:27:06 +0100 Subject: 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. --- gtk/gtkmain.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gtk/gtkmain.c') diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 98bb83dd22..01e2f246cc 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1321,6 +1321,9 @@ gtk_synthesize_crossing_events (GtkRoot *toplevel, GtkWidget *prev; gboolean seen_ancestor; + if (old_target == new_target) + return; + if (old_target && new_target) ancestor = gtk_widget_common_ancestor (old_target, new_target); else -- cgit v1.2.1