summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-08-16 20:57:09 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-08-16 21:39:42 -0500
commita7f77160d1b36029b496384087c0d71d27d73079 (patch)
treef126c6a4b6cc4c4f762baeb3112fec94989ea464
parent7a343b98cf37fb293313dada734c0d433b27fba4 (diff)
don't respect size hints for fullscreen clients
Fixes: #292
-rw-r--r--dwl.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/dwl.c b/dwl.c
index 40ea05a..212afd1 100644
--- a/dwl.c
+++ b/dwl.c
@@ -383,15 +383,17 @@ struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
void
applybounds(Client *c, struct wlr_box *bbox)
{
- 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 * c->bw), c->geom.width);
- c->geom.height = MAX(min.height + (2 * c->bw), c->geom.height);
- 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);
+ 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 * c->bw), c->geom.width);
+ c->geom.height = MAX(min.height + (2 * c->bw), c->geom.height);
+ 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);
+ }
if (c->geom.x >= bbox->x + bbox->width)
c->geom.x = bbox->x + bbox->width - c->geom.width;