sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit fce8de0f672e3c205dbbb0eb9a55d4bc05ff66ad
parent 5f15c5e91defe8afc6c0f5105b7a51625676a685
Author: Simon Ser <contact@emersion.fr>
Date:   Mon, 24 Jun 2024 09:29:59 +0200

tree/view: ensure content_{width,height} is positive

The size computations may result in a zero or negative size, which
are not valid wl_surface sizes.

Diffstat:
Msway/tree/view.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sway/tree/view.c b/sway/tree/view.c @@ -365,8 +365,8 @@ void view_autoconfigure(struct sway_view *view) { con->pending.content_x = x; con->pending.content_y = y; - con->pending.content_width = width; - con->pending.content_height = height; + con->pending.content_width = fmax(width, 1); + con->pending.content_height = fmax(height, 1); } void view_set_activated(struct sway_view *view, bool activated) {