summaryrefslogtreecommitdiff
path: root/gtk/gtktooltip.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-09 16:46:40 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-11 12:20:59 -0400
commit177c0eb9e2601613cb7f250dc9f704a660d75860 (patch)
treecf8e1ec0671e22b42f01898c4cee580079926804 /gtk/gtktooltip.c
parent1306727fb1482eed22bb98b7e6e3187246898760 (diff)
downloadgtk+-177c0eb9e2601613cb7f250dc9f704a660d75860.tar.gz
Unset tooltip window earlier
This avoids a crash when the tooltip window tries to update its action muxers.
Diffstat (limited to 'gtk/gtktooltip.c')
-rw-r--r--gtk/gtktooltip.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index fc9e665444..4af709f19e 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -990,3 +990,17 @@ gtk_tooltip_maybe_allocate (GtkNative *native)
gtk_native_check_resize (GTK_NATIVE (tooltip->window));
}
+
+void
+gtk_tooltip_unset_surface (GtkNative *native)
+{
+ GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (native));
+ GtkTooltip *tooltip;
+
+ tooltip = g_object_get_qdata (G_OBJECT (display), quark_current_tooltip);
+ if (!tooltip || GTK_NATIVE (tooltip->native) != native)
+ return;
+
+ gtk_tooltip_set_surface (tooltip, NULL);
+}
+