forked from mirror/dwl
Merge branch 'main' of github.com:djpohly/dwl
This commit is contained in:
commit
ce1d040586
1 changed files with 2 additions and 2 deletions
4
dwl.c
4
dwl.c
|
@ -387,8 +387,8 @@ applybounds(Client *c, struct wlr_box *bbox)
|
||||||
struct wlr_box min = {0}, max = {0};
|
struct wlr_box min = {0}, max = {0};
|
||||||
client_get_size_hints(c, &max, &min);
|
client_get_size_hints(c, &max, &min);
|
||||||
/* try to set size hints */
|
/* try to set size hints */
|
||||||
c->geom.width = MAX(min.width + (2 * c->bw), c->geom.width);
|
c->geom.width = MAX(min.width + (2 * (int)c->bw), c->geom.width);
|
||||||
c->geom.height = MAX(min.height + (2 * c->bw), c->geom.height);
|
c->geom.height = MAX(min.height + (2 * (int)c->bw), c->geom.height);
|
||||||
/* Some clients set them max size to INT_MAX, which does not violates
|
/* Some clients set them max size to INT_MAX, which does not violates
|
||||||
* the protocol but its innecesary, they can set them max size to zero. */
|
* the protocol but its innecesary, they can set them max size to zero. */
|
||||||
if (max.width > 0 && !(2 * c->bw > INT_MAX - max.width)) /* Checks for overflow */
|
if (max.width > 0 && !(2 * c->bw > INT_MAX - max.width)) /* Checks for overflow */
|
||||||
|
|
Loading…
Reference in a new issue