diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index fc1e050f77..9808475f73 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -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); }