~sircmpwn/wio

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH] Enforce minial window size for new_view()

Leon Plickat
Details
Message ID
<20190615023218.13490-1-leonhenrik.plickat@stud.uni-goettingen.de>
Sender timestamp
1560565939
DKIM signature
missing
Download raw message
Patch: +6 -0
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 b4cee19..50c16ba 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.22.0