1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 04:35:39 +03:00
aports/community/gtk4.0/fix-crash-gtk-synthesize.patch
2023-02-25 23:30:00 +01:00

35 lines
1.1 KiB
Diff

Patch-Source: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5052
https://gitlab.gnome.org/GNOME/gtk/-/issues/5190
--
From 94a4c2cb4019a6d155ef1b4d43d3107d8449bc98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= <nbenitezl@gmail.com>
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;
--
GitLab