[gtk+] window: Include decoration border and padding in resize area



commit e45cb3340c5b1682b8d960431d262dd873da6194
Author: Benjamin Otte <otte gnome org>
Date:   Fri Feb 26 06:49:35 2016 +0100

    window: Include decoration border and padding in resize area
    
    This is relevant for the Windows theme, which is the only theme that
    uses padding on decorations. All other themes are unaffected.

 gtk/gtkwindow.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 12ad040..a5b9a27 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6758,7 +6758,7 @@ update_border_windows (GtkWindow *window)
   cairo_region_t *region;
   cairo_rectangle_int_t rect;
   gint width, height;
-  GtkBorder border;
+  GtkBorder border, tmp;
   GtkBorder window_border;
   GtkStyleContext *context;
 
@@ -6769,6 +6769,10 @@ update_border_windows (GtkWindow *window)
 
   gtk_style_context_save_to_node (context, priv->decoration_node);
   gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &border);
+  gtk_style_context_get_border (context, gtk_style_context_get_state (context), &tmp);
+  sum_borders (&border, &tmp);
+  gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &tmp);
+  sum_borders (&border, &tmp);
   gtk_widget_style_get (widget,
                         "decoration-resize-handle", &handle,
                         NULL);


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