summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-07-26 01:31:18 -0400
committerSimon Ser <contact@emersion.fr>2019-07-26 18:13:27 +0300
commit17c9a0e84f066f6ad1e7d93be0edf8e7bf3a59b7 (patch)
tree7f5c0a4e344b39cf6b044b648eefd6e1c606ef39
parent1a16262903dce09a60f94698afa96c1b2c91c264 (diff)
arrange: remove gaps for workspace location deltas
When arranging the workspace, prev_x and prev_y should be ignoring the current gaps otherwise the workspace diff_x and diff_y location deltas will be off. When the deltas are off, each arrangement of the workspace would incorrectly move floaters an extra -workspace->current_gaps.left along the x-axis and an extra -workspace->current_gaps.top along the y-axis.
-rw-r--r--sway/tree/arrange.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c
index 696d0e1fb..7b88b3a2d 100644
--- a/sway/tree/arrange.c
+++ b/sway/tree/arrange.c
@@ -262,8 +262,8 @@ void arrange_workspace(struct sway_workspace *workspace) {
area->width, area->height, area->x, area->y);
bool first_arrange = workspace->width == 0 && workspace->height == 0;
- double prev_x = workspace->x;
- double prev_y = workspace->y;
+ double prev_x = workspace->x - workspace->current_gaps.left;
+ double prev_y = workspace->y - workspace->current_gaps.top;
workspace->width = area->width;
workspace->height = area->height;
workspace->x = output->lx + area->x;