Skip to content

Commit

Permalink
Calculate tiled resizing amount from workspace
Browse files Browse the repository at this point in the history
i3 shrinks/grows tiled windows according to screen size for ppt
unit. So, for i3 compatibility, I've changed how sway calculates
resizing amount for tiled windows.

Resolves: swaywm#7593
  • Loading branch information
nukoseer committed Jul 12, 2023
1 parent fc16fb6 commit fe14a35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sway/commands/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ static struct cmd_results *resize_adjust_tiled(uint32_t axis,
float pct = amount->amount / 100.0f;

if (is_horizontal(axis)) {
amount->amount = (float)current->pending.width * pct;
amount->amount = (float)current->pending.workspace->width * pct;
} else {
amount->amount = (float)current->pending.height * pct;
amount->amount = (float)current->pending.workspace->height * pct;
}
}

Expand Down

0 comments on commit fe14a35

Please sign in to comment.