From 482a5816f3d86e772b1648229eddd79e90a4830b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 27 Oct 2016 17:16:47 +0200 Subject: [PATCH] theme: Consider frame borders in titlebar We currently use the entire top border area to paint the titlebar, ignoring the frame border set by the theme. Fix this. https://bugzilla.gnome.org/show_bug.cgi?id=744667 --- src/ui/theme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/theme.c b/src/ui/theme.c index 2f527fb24..7421fb9f4 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -766,10 +766,10 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout, visible_rect.x, visible_rect.y, visible_rect.width, visible_rect.height); - titlebar_rect.x = visible_rect.x; - titlebar_rect.y = visible_rect.y; - titlebar_rect.width = visible_rect.width; - titlebar_rect.height = borders->visible.top / scale; + titlebar_rect.x = borders->total.left / scale; + titlebar_rect.y = visible_rect.y + layout->frame_border.top; + titlebar_rect.width = (fgeom->width - borders->total.left - borders->total.right) / scale; + titlebar_rect.height = borders->visible.top / scale - layout->frame_border.top; style = style_info->styles[META_STYLE_ELEMENT_TITLEBAR]; gtk_render_background (style, cr,