[gtk/wip/otte/dnd: 144/144] main: Don't synthesize crossing events when nothing changed
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/dnd: 144/144] main: Don't synthesize crossing events when nothing changed
- Date: Sat, 22 Feb 2020 03:30:34 +0000 (UTC)
commit 6a9d5282ea494eff31db35bd75612d20d28b7c78
Author: Benjamin Otte <otte redhat com>
Date: Sat Feb 22 04:27:06 2020 +0100
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(+)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]