[gtk/wip/baedert/for-master: 4/38] Window: inline function into only caller



commit c2c8b75cbdad61e17a45f45a3f3635b27a0c11a4
Author: Timm Bäder <mail baedert org>
Date:   Wed Feb 5 15:10:30 2020 +0100

    Window: inline function into only caller

 gtk/gtkwindow.c | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index c4e4446728..33c547d415 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]