summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-08-22 14:33:13 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-08-22 14:33:13 +0400
commitd53e17f288580e81b574ba608d36cda731f790d5 (patch)
tree3af96b69a46055146e300d1b1838df62ede35b79
parent37d4bc8a7198a83dec37f3de9807580b3c870387 (diff)
automatically exits fullscreen right when another window is spawned
-rw-r--r--dwm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index c67584b..ecf7c1b 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1108,6 +1108,10 @@ manage(Window w, XWindowAttributes *wa)
(unsigned char *) &(c->win), 1);
XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
setclientstate(c, NormalState);
+
+ if(selmon->sel && selmon->sel->isfullscreen && !c->isfloating)
+ setfullscreen(selmon->sel, 0);
+
if (c->mon == selmon)
unfocus(selmon->sel, 0);
c->mon->sel = c;