Window: inline function into only caller
authorTimm Bäder <mail@baedert.org>
Wed, 5 Feb 2020 14:10:30 +0000 (15:10 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 7 Feb 2020 18:15:59 +0000 (13:15 -0500)
gtk/gtkwindow.c

index c4e444672814f90e82278beab4e0f39c3099aed8..33c547d4156720238917e19f5cb877ed9e2d0d61 100644 (file)
@@ -5380,20 +5380,6 @@ update_csd_shape (GtkWindow *window)
     }
 }
 
-static void
-update_shadow_width (GtkWindow *window,
-                     GtkBorder *border)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  if (priv->surface)
-    gdk_surface_set_shadow_width (priv->surface,
-                                 border->left,
-                                 border->right,
-                                 border->top,
-                                 border->bottom);
-}
-
 static void
 corner_rect (cairo_rectangle_int_t *rect,
              const GtkCssValue     *value)
@@ -5493,8 +5479,12 @@ update_realized_window_properties (GtkWindow     *window,
 {
   GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
 
-  if (priv->client_decorated && priv->use_client_shadow)
-    update_shadow_width (window, window_border);
+  if (priv->surface && priv->client_decorated && priv->use_client_shadow)
+    gdk_surface_set_shadow_width (priv->surface,
+                                  window_border->left,
+                                  window_border->right,
+                                  window_border->top,
+                                  window_border->bottom);
 
   update_opaque_region (window, window_border, child_allocation);
   update_csd_shape (window);