summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-02-22 04:27:06 +0100
committerBenjamin Otte <otte@redhat.com>2020-02-22 07:33:40 +0100
commita12e563cd2d5d33a628f1e825dcbefd6423ca11e (patch)
tree31bca9e44cbbfc0dea010021986a28f45b1a3dba /gtk/gtkmain.c
parenta5e2275a72618c726592713d51f3254901b5e896 (diff)
downloadgtk+-a12e563cd2d5d33a628f1e825dcbefd6423ca11e.tar.gz
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.
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c3
1 files changed, 3 insertions, 0 deletions
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