[gtk/wip/otte/dnd: 21/21] 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: 21/21] main: Don't synthesize crossing events when nothing changed
- Date: Sat, 22 Feb 2020 04:52:18 +0000 (UTC)
commit aca674f65ae9f068ee2764f7389b7e6d1893527b
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]