summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2016-04-07 15:56:46 +0200
committerMatthias Clasen <mclasen@redhat.com>2016-04-19 10:23:39 -0400
commit115af7c96ea19ea5c32cd31fe37427a954ac6769 (patch)
treef31ea9f6f97c655278be42d41a40f57a723f2b1a
parent139cb2a51021f766337b2283263aa976a3f2f145 (diff)
downloadgtk+-115af7c96ea19ea5c32cd31fe37427a954ac6769.tar.gz
wayland: do not update shadows for child windows
glade-previewer places a gtkwindow inside another toplevel gtkwindow, updating the shadow width for the client induces a busy loop where the parent will grow continuously until it crashes gnome-shell/mutter. To avoid the loop, do not update the shadow width if not dealing with a toplevel window. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=761651
-rw-r--r--gtk/gtkwindow.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index f1d736c885..72053cf893 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7104,13 +7104,15 @@ update_realized_window_properties (GtkWindow *window,
{
GtkWindowPrivate *priv = window->priv;
+ if (!_gtk_widget_is_toplevel (GTK_WIDGET (window)))
+ return;
+
if (priv->client_decorated && priv->use_client_shadow)
update_shadow_width (window, window_border);
update_opaque_region (window, window_border, child_allocation);
- if (_gtk_widget_is_toplevel (GTK_WIDGET (window)))
- update_border_windows (window);
+ update_border_windows (window);
}
static void