diff options
author | Victor Kareh <[email protected]> | 2018-08-27 22:28:01 -0400 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2018-08-28 09:39:37 -0400 |
commit | 48b0b11dcd18737135a01b48f355c2cb74b3fd6a (patch) | |
tree | 77c40b994f369476a8b97cbd980fed9fedfa8124 /src/core/screen.c | |
parent | 2ce772a8297517012ba3a7f7d0433c905e2a47ea (diff) | |
download | marco-48b0b11dcd18737135a01b48f355c2cb74b3fd6a.tar.bz2 marco-48b0b11dcd18737135a01b48f355c2cb74b3fd6a.tar.xz |
tabpopup.c: always show 5px outline border
Adapted from metacity for marco
Origin commit: https://gitlab.gnome.org/GNOME/metacity/commit/aab7b07a
Author: Alberts Muktupāvels <[email protected]>
Date: Fri Oct 3 19:57:08 2014 +0300
Diffstat (limited to 'src/core/screen.c')
-rw-r--r-- | src/core/screen.c | 48 |
1 files changed, 13 insertions, 35 deletions
diff --git a/src/core/screen.c b/src/core/screen.c index 107a2d0b..1259ca8a 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -1358,42 +1358,20 @@ meta_screen_ensure_tab_popup (MetaScreen *screen, * edge. */ if (border & BORDER_OUTLINE_WINDOW) - { - const gint border_outline_width = 5; - - /* Top side */ - if (!entries[i].hidden && - window->frame && window->frame->bottom_height > 0 && - window->frame->child_y >= window->frame->bottom_height) - entries[i].inner_rect.y = window->frame->bottom_height; - else - entries[i].inner_rect.y = border_outline_width; - - /* Bottom side */ - if (!entries[i].hidden && - window->frame && window->frame->bottom_height != 0) - entries[i].inner_rect.height = r.height - - entries[i].inner_rect.y - window->frame->bottom_height; - else - entries[i].inner_rect.height = r.height - - entries[i].inner_rect.y - border_outline_width; - - /* Left side */ - if (!entries[i].hidden && window->frame && window->frame->child_x != 0) - entries[i].inner_rect.x = window->frame->child_x; - else - entries[i].inner_rect.x = border_outline_width; - - /* Right side */ - if (!entries[i].hidden && - window->frame && window->frame->right_width != 0) - entries[i].inner_rect.width = r.width - - entries[i].inner_rect.x - window->frame->right_width; - else - entries[i].inner_rect.width = r.width - - entries[i].inner_rect.x - border_outline_width; - } + { +#define OUTLINE_WIDTH 5 + /* Top side */ + entries[i].inner_rect.y = OUTLINE_WIDTH; + + /* Bottom side */ + entries[i].inner_rect.height = r.height - entries[i].inner_rect.y - OUTLINE_WIDTH; + + /* Left side */ + entries[i].inner_rect.x = OUTLINE_WIDTH; + /* Right side */ + entries[i].inner_rect.width = r.width - entries[i].inner_rect.x - OUTLINE_WIDTH; + } ++i; tmp = tmp->next; |