mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
commands/resize: don't consider 1px resizes to be invalid
A "resize shrink width 1px" will cause grow_x to be 0 while grow_width is -1, incorrectly rejecting the command even though the resize is not a noop. Fix this by checking width/height instead of x/y.
This commit is contained in:
parent
9e272a7986
commit
1be66c98f2
|
@ -224,7 +224,7 @@ static struct cmd_results *resize_adjust_floating(uint32_t axis,
|
||||||
} else if (axis == WLR_EDGE_LEFT) {
|
} else if (axis == WLR_EDGE_LEFT) {
|
||||||
grow_x = -grow_width;
|
grow_x = -grow_width;
|
||||||
}
|
}
|
||||||
if (grow_x == 0 && grow_y == 0) {
|
if (grow_width == 0 && grow_height == 0) {
|
||||||
return cmd_results_new(CMD_INVALID, "Cannot resize any further");
|
return cmd_results_new(CMD_INVALID, "Cannot resize any further");
|
||||||
}
|
}
|
||||||
con->x += grow_x;
|
con->x += grow_x;
|
||||||
|
|
Loading…
Reference in a new issue