diff options
| author | mtvare6 <mtvare6@proton.me> | 2024-10-29 14:56:33 +0530 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2024-11-28 20:39:26 +0100 |
| commit | 97e2556de7e370e14ac1e8e7608c72173dafba55 (patch) | |
| tree | 7183797a84d4b09c83be6c3c4b75024900182b97 | |
| parent | 3f19cd503cfa1bcd6764f529ecd633b44bb4fb58 (diff) | |
desktop/transaction: clamp vertical border length to 0
Fixes #8120
(cherry picked from commit 62fd8c4d011ea4dc360831723a3844c0e4439f32)
| -rw-r--r-- | sway/desktop/transaction.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 8f12832a..50a597a6 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -424,13 +424,14 @@ static void arrange_container(struct sway_container *con, int border_bottom = con->current.border_bottom ? border_width : 0; int border_left = con->current.border_left ? border_width : 0; int border_right = con->current.border_right ? border_width : 0; + int vert_border_height = MAX(0, height - border_top - border_bottom); wlr_scene_rect_set_size(con->border.top, width, border_top); wlr_scene_rect_set_size(con->border.bottom, width, border_bottom); wlr_scene_rect_set_size(con->border.left, - border_left, height - border_top - border_bottom); + border_left, vert_border_height); wlr_scene_rect_set_size(con->border.right, - border_right, height - border_top - border_bottom); + border_right, vert_border_height); wlr_scene_node_set_position(&con->border.top->node, 0, 0); wlr_scene_node_set_position(&con->border.bottom->node, |
