summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/screen.c48
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;