|
|
c70ea2 |
From 2fd734c349ab00f2f460af97f7c383678407f620 Mon Sep 17 00:00:00 2001
|
|
|
c70ea2 |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
c70ea2 |
Date: Wed, 16 Jan 2019 01:09:26 +0100
|
|
|
c70ea2 |
Subject: [PATCH] constraints: Fix titlebars going off the bottom
|
|
|
c70ea2 |
|
|
|
c70ea2 |
The "current" rect includes the frame, so in order to keep the
|
|
|
c70ea2 |
titlebar on screen, window movement must be restricted to at
|
|
|
c70ea2 |
most (height - titlebar_height) past the work area bottom.
|
|
|
c70ea2 |
|
|
|
c70ea2 |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/391
|
|
|
c70ea2 |
---
|
|
|
c70ea2 |
src/core/constraints.c | 4 ++--
|
|
|
c70ea2 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
c70ea2 |
|
|
|
c70ea2 |
diff --git a/src/core/constraints.c b/src/core/constraints.c
|
|
|
c70ea2 |
index 3b6203d6b..92b146ce3 100644
|
|
|
c70ea2 |
--- a/src/core/constraints.c
|
|
|
c70ea2 |
+++ b/src/core/constraints.c
|
|
|
c70ea2 |
@@ -1570,7 +1570,7 @@ constrain_titlebar_visible (MetaWindow *window,
|
|
|
c70ea2 |
MetaFrameBorders borders;
|
|
|
c70ea2 |
meta_frame_calc_borders (window->frame, &borders);
|
|
|
c70ea2 |
|
|
|
c70ea2 |
- bottom_amount = info->current.height + borders.visible.bottom;
|
|
|
c70ea2 |
+ bottom_amount = info->current.height - borders.visible.top;
|
|
|
c70ea2 |
vert_amount_onscreen = borders.visible.top;
|
|
|
c70ea2 |
}
|
|
|
c70ea2 |
else
|
|
|
c70ea2 |
@@ -1649,7 +1649,7 @@ constrain_partially_onscreen (MetaWindow *window,
|
|
|
c70ea2 |
MetaFrameBorders borders;
|
|
|
c70ea2 |
meta_frame_calc_borders (window->frame, &borders);
|
|
|
c70ea2 |
|
|
|
c70ea2 |
- bottom_amount = info->current.height + borders.visible.bottom;
|
|
|
c70ea2 |
+ bottom_amount = info->current.height - borders.visible.top;
|
|
|
c70ea2 |
vert_amount_onscreen = borders.visible.top;
|
|
|
c70ea2 |
}
|
|
|
c70ea2 |
else
|
|
|
c70ea2 |
--
|
|
|
c70ea2 |
2.20.1
|
|
|
c70ea2 |
|