dwm

personal fork of dwm (rnpnr branch)
git clone anongit@rnpnr.xyz:dwm.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 5ecf991be63e58afb12d954b6860be1c4470471c
Parent: 0d2157033b2f325819597881437b48da4895cbec
Author: Randy Palamar
Date:   Sun,  7 Mar 2021 13:13:40 -0700

stop clients from ending up in limbo from fakefullscreen

the behaviour when toggling the mode while in a fullscreen window was
not what was expected. now if you toggle the client be forced to return
to its previous non-fullscreen state.

the change in togglefullscr() simply avoids a needless branch into
setfullscr() when we are in fakefullscr mode

Diffstat:
Mdwm.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -1503,10 +1503,6 @@ setfullscreen(Client *c, int fullscreen) XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32, PropModeReplace, (unsigned char*)0, 0); c->isfullscreen = 0; - - if (fakefullscreen) - return; - c->isfloating = c->oldstate; c->bw = c->oldbw; c->x = c->oldx; @@ -1736,6 +1732,8 @@ void togglefakefull(const Arg *arg) { fakefullscreen = !fakefullscreen; + if (selmon->sel && selmon->sel->isfullscreen) + setfullscreen(selmon->sel, 0); } void @@ -1755,7 +1753,7 @@ togglefloating(const Arg *arg) void togglefullscr(const Arg *arg) { - if (selmon->sel) + if (!fakefullscreen && selmon->sel) setfullscreen(selmon->sel, !selmon->sel->isfullscreen); }