~sircmpwn/wio

30c2643a28f795a0b441dd834ea9580b0002c587 — Leon Plickat 4 years ago 8ecffde
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.
1 files changed, 6 insertions(+), 0 deletions(-)

M input.c
M input.c => input.c +6 -0
@@ 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");