[metacity/wip/muktupavels/issue-21] window: offset gravity position by invisible borders
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/wip/muktupavels/issue-21] window: offset gravity position by invisible borders
- Date: Thu, 22 Jul 2021 13:37:18 +0000 (UTC)
commit c4a9e1bc29bd4ad28b7e44b8f3408583aa6b3d4f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Jul 22 15:19:12 2021 +0300
window: offset gravity position by invisible borders
https://gitlab.gnome.org/GNOME/metacity/-/issues/21
src/core/window.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 948687d7..953a9af9 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -4138,9 +4138,22 @@ meta_window_get_gravity_position (MetaWindow *window,
else
{
if (window->frame == NULL)
- frame_extents = window->rect;
+ {
+ frame_extents = window->rect;
+ }
else
- frame_extents = window->frame->rect;
+ {
+ MetaFrameBorders borders;
+
+ frame_extents = window->frame->rect;
+
+ meta_frame_calc_borders (window->frame, &borders);
+
+ frame_extents.x += borders.invisible.left;
+ frame_extents.y += borders.invisible.top;
+ frame_extents.width -= borders.invisible.left + borders.invisible.right;
+ frame_extents.height -= borders.invisible.top + borders.invisible.bottom;
+ }
}
x = frame_extents.x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]