[gtk] window: Unrealize renderer before children
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] window: Unrealize renderer before children
- Date: Wed, 23 Oct 2019 00:29:09 +0000 (UTC)
commit 0284d40e24586278d3997ab2ace145ba16cbd9cc
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 22 19:52:14 2019 -0400
window: Unrealize renderer before children
Unrealize the GSK renderer before destroying children.
This makes the renderer drop any texture caches that
it might have, so that we don't needlessly download
them when releasing the widget-side holder objects.
As a fortunate side effect, this fixes crashes on
exit with GtkGLArea-containing windows under Wayland.
gtk/gtkwindow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index c93b733f61..4891a36167 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5687,6 +5687,8 @@ gtk_window_unrealize (GtkWidget *widget)
info->last.flags = 0;
}
+ gsk_renderer_unrealize (priv->renderer);
+
if (priv->popup_menu)
{
gtk_widget_destroy (priv->popup_menu);
@@ -5700,7 +5702,6 @@ gtk_window_unrealize (GtkWidget *widget)
(GtkCallback) gtk_widget_unrealize,
NULL);
- gsk_renderer_unrealize (priv->renderer);
g_clear_object (&priv->renderer);
surface = priv->surface;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]