Skip to content

Commit 48b0b11

Browse files
committed
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
1 parent 2ce772a commit 48b0b11

File tree

1 file changed

+13
-35
lines changed

1 file changed

+13
-35
lines changed

src/core/screen.c

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,42 +1358,20 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
13581358
* edge.
13591359
*/
13601360
if (border & BORDER_OUTLINE_WINDOW)
1361-
{
1362-
const gint border_outline_width = 5;
1363-
1364-
/* Top side */
1365-
if (!entries[i].hidden &&
1366-
window->frame && window->frame->bottom_height > 0 &&
1367-
window->frame->child_y >= window->frame->bottom_height)
1368-
entries[i].inner_rect.y = window->frame->bottom_height;
1369-
else
1370-
entries[i].inner_rect.y = border_outline_width;
1371-
1372-
/* Bottom side */
1373-
if (!entries[i].hidden &&
1374-
window->frame && window->frame->bottom_height != 0)
1375-
entries[i].inner_rect.height = r.height
1376-
- entries[i].inner_rect.y - window->frame->bottom_height;
1377-
else
1378-
entries[i].inner_rect.height = r.height
1379-
- entries[i].inner_rect.y - border_outline_width;
1380-
1381-
/* Left side */
1382-
if (!entries[i].hidden && window->frame && window->frame->child_x != 0)
1383-
entries[i].inner_rect.x = window->frame->child_x;
1384-
else
1385-
entries[i].inner_rect.x = border_outline_width;
1386-
1387-
/* Right side */
1388-
if (!entries[i].hidden &&
1389-
window->frame && window->frame->right_width != 0)
1390-
entries[i].inner_rect.width = r.width
1391-
- entries[i].inner_rect.x - window->frame->right_width;
1392-
else
1393-
entries[i].inner_rect.width = r.width
1394-
- entries[i].inner_rect.x - border_outline_width;
1395-
}
1361+
{
1362+
#define OUTLINE_WIDTH 5
1363+
/* Top side */
1364+
entries[i].inner_rect.y = OUTLINE_WIDTH;
1365+
1366+
/* Bottom side */
1367+
entries[i].inner_rect.height = r.height - entries[i].inner_rect.y - OUTLINE_WIDTH;
1368+
1369+
/* Left side */
1370+
entries[i].inner_rect.x = OUTLINE_WIDTH;
13961371

1372+
/* Right side */
1373+
entries[i].inner_rect.width = r.width - entries[i].inner_rect.x - OUTLINE_WIDTH;
1374+
}
13971375

13981376
++i;
13991377
tmp = tmp->next;

0 commit comments

Comments
 (0)