summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStivvo <stivvo01@gmail.com>2020-10-08 21:04:53 +0200
committerStivvo <stivvo01@gmail.com>2020-10-08 21:04:53 +0200
commita2ed3d45bb1e2cd8c7f1df54283b3188c3b23841 (patch)
tree8d154011484003869969e16355220c4f82c14de6
parent172bcfd3ffcbaafb5198b162f8b704b0172fe9a0 (diff)
Keep windows fullscreen after redraw
This fixes the bug that happens when changing workspace (or any time arrange() is called) where there are fullscreen windows, which are still fullscreen but leave the space for layer surfaces like waybar (which should be hidden when going fullscreen) Also as soon one fullscreen window is found hte function returns to improve efficiency
-rw-r--r--dwl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index d7cc46f..c0182c5 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1017,6 +1017,10 @@ monocle(Monitor *m)
wl_list_for_each(c, &clients, link) {
if (!VISIBLEON(c, m) || c->isfloating)
continue;
+ if (c->isfullscreen) {
+ resize(c, c->mon->m.x, c->mon->m.y, c->mon->m.width, c->mon->m.height, 0);
+ return;
+ }
resize(c, m->w.x, m->w.y, m->w.width, m->w.height, 0);
}
}
@@ -1728,6 +1732,10 @@ tile(Monitor *m)
wl_list_for_each(c, &clients, link) {
if (!VISIBLEON(c, m) || c->isfloating)
continue;
+ if (c->isfullscreen) {
+ resize(c, c->mon->m.x, c->mon->m.y, c->mon->m.width, c->mon->m.height, 0);
+ return;
+ }
if (i < m->nmaster) {
h = (m->w.height - my) / (MIN(n, m->nmaster) - i);
resize(c, m->w.x, m->w.y + my, mw, h, 0);