diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2015-04-15 15:35:47 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2015-04-15 15:35:47 +0300 |
commit | 283e19a9a4df8209db58958709957ab5a46bf7ea (patch) | |
tree | e4138e00c61aed61f97a57073d91bd779a00c3ba | |
parent | c66d83a7e44e2d51e110a4c0d5d60caa103e5c31 (diff) | |
download | metacity-283e19a9a4df8209db58958709957ab5a46bf7ea.tar.gz |
theme (gtk+): fix missing border on windows
If windows are not resizable then invisible border is set to 0.
This is problem with GTK+ themes because border (box-shadow) is in
invisible area.
-rw-r--r-- | src/ui/theme.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c index 927b2a5a..85320806 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -417,6 +417,7 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout, MetaFrameBorders *borders) { int buttons_height, title_height; + MetaTheme *current; meta_frame_borders_clear (borders); @@ -440,18 +441,30 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout, borders->visible.right = layout->right_width; borders->visible.bottom = layout->bottom_height; - if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE) + current = meta_theme_get_current (); + + if (current->is_gtk_theme == TRUE) { borders->invisible.left = layout->invisible_border.left; borders->invisible.right = layout->invisible_border.right; + borders->invisible.bottom = layout->invisible_border.bottom; + borders->invisible.top = layout->invisible_border.top; } - - if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE) + else { - borders->invisible.bottom = layout->invisible_border.bottom; + if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE) + { + borders->invisible.left = layout->invisible_border.left; + borders->invisible.right = layout->invisible_border.right; + } - if (type != META_FRAME_TYPE_ATTACHED) - borders->invisible.top = layout->invisible_border.top; + if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE) + { + borders->invisible.bottom = layout->invisible_border.bottom; + + if (type != META_FRAME_TYPE_ATTACHED) + borders->invisible.top = layout->invisible_border.top; + } } borders->total.left = borders->invisible.left + borders->visible.left; |