diff options
| author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-07-08 20:07:27 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2023-11-14 19:44:28 -0600 | 
| commit | 31bf1cbaf6418a6fb39e41b21cadc5c20826a663 (patch) | |
| tree | e9609275aa6c11381be9ee8fd7bc0fde6613d603 /dwl.c | |
| parent | a4a83e95e69afd45ff1770149810d79de39b8467 (diff) | |
Revert "respect size hints"
This reverts commit 72e0a560d9836c5e8658003f548203bcd722e565.
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 16 | 
1 files changed, 3 insertions, 13 deletions
| @@ -399,19 +399,9 @@ static xcb_atom_t netatom[NetLast];  void  applybounds(Client *c, struct wlr_box *bbox)  { -	if (!c->isfullscreen) { -		struct wlr_box min = {0}, max = {0}; -		client_get_size_hints(c, &max, &min); -		/* try to set size hints */ -		c->geom.width = MAX(min.width + (2 * (int)c->bw), c->geom.width); -		c->geom.height = MAX(min.height + (2 * (int)c->bw), c->geom.height); -		/* Some clients set their max size to INT_MAX, which does not violate the -		 * protocol but it's unnecesary, as they can set their max size to zero. */ -		if (max.width > 0 && !(2 * c->bw > INT_MAX - max.width)) /* Checks for overflow */ -			c->geom.width = MIN(max.width + (2 * c->bw), c->geom.width); -		if (max.height > 0 && !(2 * c->bw > INT_MAX - max.height)) /* Checks for overflow */ -			c->geom.height = MIN(max.height + (2 * c->bw), c->geom.height); -	} +	/* set minimum possible */ +	c->geom.width = MAX(1, c->geom.width); +	c->geom.height = MAX(1, c->geom.height);  	if (c->geom.x >= bbox->x + bbox->width)  		c->geom.x = bbox->x + bbox->width - c->geom.width; | 
