From 30c2643a28f795a0b441dd834ea9580b0002c587 Mon Sep 17 00:00:00 2001 From: Leon Plickat Date: Sat, 15 Jun 2019 04:32:19 +0200 Subject: [PATCH] Enforce minial window size for new_view() The minimal window size of 100x100 is already enforced for reshaping views. Also enforcing it for spawning new views makes sense, so users will not accidentaly spawn views to small to interact with. --- input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/input.c b/input.c index 0f191d6..9210194 100644 --- a/input.c +++ b/input.c @@ -242,6 +242,12 @@ static void new_view(struct wio_server *server) { view->box.y = y1; view->box.width = x2 - x1; view->box.height = y2 - y1; + if (view->box.width < 100){ + view->box.width = 100; + } + if (view->box.height < 100){ + view->box.height = 100; + } int fd[2]; if (pipe(fd) != 0) { wlr_log(WLR_ERROR, "Unable to create pipe for fork"); -- 2.45.2