[metacity/cowbell] calc w+h correctly



commit 07a10f33154abdbfbdf9c3a7e47a9007230adbb2
Author: Thomas Thurman <tthurman gnome org>
Date:   Mon Oct 19 16:50:14 2009 -0400

    calc w+h correctly

 src/ui/theme.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index c9a267b..53ddfb2 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -478,8 +478,9 @@ meta_theme_draw_frame_with_style (MetaTheme              *theme,
 
   int x = 0;
   int y = 0;
-  int w = client_width + SILLY_BORDER_SIZE * 2;
-  int h = client_height + SILLY_BORDER_SIZE * 2;
+  int w = client_width;
+  int h = client_height;
+  int te, be, le, re;
 
   PangoRectangle text_extents;
 
@@ -490,6 +491,11 @@ meta_theme_draw_frame_with_style (MetaTheme              *theme,
   CopperClasses *cursor;
   int leftpos, rightpos;
 
+  meta_theme_get_frame_borders (theme, type, text_height, flags,
+                                &te, &be, &le, &re);
+  w += le+re;
+  h += te+be;
+
   cowbell_style_title_text (stylesheet, title_layout, cr);
 
   pango_layout_get_pixel_extents (title_layout, NULL, &text_extents);



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