aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-07-26 01:31:18 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2019-07-26 18:13:27 +0300
commit17c9a0e84f066f6ad1e7d93be0edf8e7bf3a59b7 (patch)
tree7f5c0a4e344b39cf6b044b648eefd6e1c606ef39
parentipc: add input::libinput_config event (diff)
downloadsway-17c9a0e84f066f6ad1e7d93be0edf8e7bf3a59b7.tar.gz
sway-17c9a0e84f066f6ad1e7d93be0edf8e7bf3a59b7.tar.zst
sway-17c9a0e84f066f6ad1e7d93be0edf8e7bf3a59b7.zip
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 696d0e1f..7b88b3a2 100644
--- a/sway/tree/arrange.c
+++ b/sway/tree/arrange.c
@@ -262,8 +262,8 @@ void arrange_workspace(struct sway_workspace *workspace) {
262 area->width, area->height, area->x, area->y); 262 area->width, area->height, area->x, area->y);
263 263
264 bool first_arrange = workspace->width == 0 && workspace->height == 0; 264 bool first_arrange = workspace->width == 0 && workspace->height == 0;
265 double prev_x = workspace->x; 265 double prev_x = workspace->x - workspace->current_gaps.left;
266 double prev_y = workspace->y; 266 double prev_y = workspace->y - workspace->current_gaps.top;
267 workspace->width = area->width; 267 workspace->width = area->width;
268 workspace->height = area->height; 268 workspace->height = area->height;
269 workspace->x = output->lx + area->x; 269 workspace->x = output->lx + area->x;