summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-05-22 12:55:52 -0400
committerVictor Kareh <[email protected]>2019-06-05 10:49:37 -0400
commit6b735b9d98f82a1b62cd5183f10967cbc77fd016 (patch)
tree32cb52858c242c04dccaa2844ac51e40130cc243
parentca53c82e4cb44eb5ca69130acfe2867fe6405365 (diff)
downloadmarco-6b735b9d98f82a1b62cd5183f10967cbc77fd016.tar.bz2
marco-6b735b9d98f82a1b62cd5183f10967cbc77fd016.tar.xz
MetaWindow: Compensate for invisible border changes
https://bugzilla.gnome.org/show_bug.cgi?id=644930 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/85e15225
-rw-r--r--src/core/window.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 7221ae78..d554e9a9 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3267,10 +3267,10 @@ adjust_for_gravity (MetaWindow *window,
if (borders)
{
- child_x = borders->visible.left;
- child_y = borders->visible.top;
- frame_width = child_x + rect->width + borders->visible.right;
- frame_height = child_y + rect->height + borders->visible.bottom;
+ child_x = borders->total.left;
+ child_y = borders->total.top;
+ frame_width = child_x + rect->width + borders->total.left;
+ frame_height = child_y + rect->height + borders->total.top;
}
else
{
@@ -3589,12 +3589,12 @@ meta_window_move_resize_internal (MetaWindow *window,
{
int frame_size_dx, frame_size_dy, new_w, new_h;
- new_w = window->rect.width + borders.visible.left + borders.visible.right;
+ new_w = window->rect.width + borders.total.left + borders.total.right;
if (window->shaded)
- new_h = borders.visible.top;
+ new_h = borders.total.top;
else
- new_h = window->rect.height + borders.visible.top + borders.visible.bottom;
+ new_h = window->rect.height + borders.total.top + borders.total.bottom;
frame_size_dx = new_w - window->frame->rect.width;
frame_size_dy = new_h - window->frame->rect.height;
@@ -3631,8 +3631,8 @@ meta_window_move_resize_internal (MetaWindow *window,
int frame_pos_dx, frame_pos_dy;
/* Compute new frame coords */
- new_x = root_x_nw - borders.visible.left;
- new_y = root_y_nw - borders.visible.top;
+ new_x = root_x_nw - borders.total.left;
+ new_y = root_y_nw - borders.total.top;
frame_pos_dx = new_x - window->frame->rect.x;
frame_pos_dy = new_y - window->frame->rect.y;
@@ -3655,8 +3655,8 @@ meta_window_move_resize_internal (MetaWindow *window,
* remember they are the server coords
*/
- new_x = borders.visible.left;
- new_y = borders.visible.top;
+ new_x = borders.total.left;
+ new_y = borders.total.top;
if (need_resize_frame && need_move_frame &&
static_gravity_works (window->display))
@@ -3727,15 +3727,15 @@ meta_window_move_resize_internal (MetaWindow *window,
/* If frame extents have changed, fill in other frame fields and
change frame's extents property. */
if (have_window_frame &&
- (window->frame->child_x != borders.visible.left ||
- window->frame->child_y != borders.visible.top ||
- window->frame->right_width != borders.visible.right ||
- window->frame->bottom_height != borders.visible.bottom))
- {
- window->frame->child_x = borders.visible.left;
- window->frame->child_y = borders.visible.top;
- window->frame->right_width = borders.visible.right;
- window->frame->bottom_height = borders.visible.bottom;
+ (window->frame->child_x != borders.total.left ||
+ window->frame->child_y != borders.total.top ||
+ window->frame->right_width != borders.total.right ||
+ window->frame->bottom_height != borders.total.bottom))
+ {
+ window->frame->child_x = borders.total.left;
+ window->frame->child_y = borders.total.top;
+ window->frame->right_width = borders.total.right;
+ window->frame->bottom_height = borders.total.bottom;
update_net_frame_extents (window);
}