Skip to content
Permalink
Browse files

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 <alberts.muktupavels@gmail.com>
Date:          Fri Oct 3 19:57:08 2014 +0300
  • Loading branch information...
vkareh committed Aug 28, 2018
1 parent 2ce772a commit 48b0b11dcd18737135a01b48f355c2cb74b3fd6a
Showing with 13 additions and 35 deletions.
  1. +13 −35 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;

0 comments on commit 48b0b11

Please sign in to comment.
You can’t perform that action at this time.