Commit 4cb1b964 authored by Olivier Fourdan's avatar Olivier Fourdan

gtkwindow: Update shadow size on state change

Otherwise, with CSD, we could have a discrepancy where gtk uses the
right values for the shadows whereas the gdk backend still uses the old
values, leading in some cases to invalid or negative min size being
computed (which, in Wayland, leads a protocol error).

https://bugzilla.gnome.org/show_bug.cgi?id=771561
parent b6ac1b4b
......@@ -7528,6 +7528,19 @@ update_window_style_classes (GtkWindow *window)
gtk_style_context_remove_class (context, "fullscreen");
}
static void
update_window_borders (GtkWindow *window)
{
GtkWindowPrivate *priv = window->priv;
GtkBorder window_border = { 0 };
if (priv->client_decorated && priv->use_client_shadow)
{
get_shadow_width (window, &window_border);
update_shadow_width (window, &window_border);
}
}
static void
popover_size_allocate (GtkWidget *widget,
GtkWindowPopover *popover,
......@@ -7798,6 +7811,7 @@ gtk_window_state_event (GtkWidget *widget,
{
update_window_style_classes (window);
update_window_buttons (window);
update_window_borders (window);
gtk_widget_queue_resize (widget);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment