From 94a4c2cb4019a6d155ef1b4d43d3107d8449bc98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= Date: Sat, 24 Sep 2022 21:16:18 -0400 Subject: [PATCH] fix crash in gtk_synthesize_crossing_events() Update ancestor between GTK_CROSSING_OUT and GTK_CROSSING_IN as it may have changed. Fixes #5190 --- gtk/gtkmain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 7ea84d4878..dfa9e399ef 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1186,6 +1186,11 @@ gtk_synthesize_crossing_events (GtkRoot *toplevel, for (widget = new_target; widget; widget = _gtk_widget_get_parent (widget)) gtk_widget_stack_append (&target_array, g_object_ref (widget)); + if (old_target && new_target) + ancestor = gtk_widget_common_ancestor (old_target, new_target); + else + ancestor = NULL; + crossing.direction = GTK_CROSSING_IN; seen_ancestor = FALSE;