summaryrefslogtreecommitdiffhomepage
path: root/patch/fakefullscreenclient.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-09-05 14:20:53 +0200
committerbakkeby <[email protected]>2020-09-05 14:20:53 +0200
commitc14f40190e230070d0975f3ee3f66bca4da19774 (patch)
tree0e6b369b9b2401c474fcdd49631532e0039bf65a /patch/fakefullscreenclient.c
parentdc277e6c8fcdd749bbd07d435826ec5408f88903 (diff)
downloaddwm-flexipatch-c14f40190e230070d0975f3ee3f66bca4da19774.tar.gz
dwm-flexipatch-c14f40190e230070d0975f3ee3f66bca4da19774.zip
Assortment of fullscreen improvements
Diffstat (limited to 'patch/fakefullscreenclient.c')
-rw-r--r--patch/fakefullscreenclient.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/patch/fakefullscreenclient.c b/patch/fakefullscreenclient.c
index 2b4b279..8805c4b 100644
--- a/patch/fakefullscreenclient.c
+++ b/patch/fakefullscreenclient.c
@@ -1,26 +1,27 @@
void
togglefakefullscreen(const Arg *arg)
{
- if (!selmon->sel)
+ Client *c = selmon->sel;
+ if (!c)
return;
- if (selmon->sel->fakefullscreen) {
- if (selmon->sel->isfullscreen)
- selmon->sel->fakefullscreen = 0;
+ if (c->fakefullscreen) {
+ if (c->isfullscreen)
+ c->fakefullscreen = 0;
else
- selmon->sel->isfullscreen = 0;
+ c->isfullscreen = 0;
} else {
- if (selmon->sel->isfullscreen) {
- selmon->sel->isfloating = selmon->sel->oldstate;
- selmon->sel->bw = selmon->sel->oldbw;
- selmon->sel->x = selmon->sel->oldx;
- selmon->sel->y = selmon->sel->oldy;
- selmon->sel->w = selmon->sel->oldw;
- selmon->sel->h = selmon->sel->oldh;
- resizeclient(selmon->sel, selmon->sel->x, selmon->sel->y, selmon->sel->w, selmon->sel->h);
+ if (c->isfullscreen) {
+ c->isfloating = c->oldstate;
+ c->bw = c->oldbw;
+ c->x = c->oldx;
+ c->y = c->oldy;
+ c->w = c->oldw;
+ c->h = c->oldh;
+ resizeclient(c, c->x, c->y, c->w, c->h);
}
- selmon->sel->fakefullscreen = 1;
- selmon->sel->isfullscreen = 0;
+ c->fakefullscreen = 1;
+ c->isfullscreen = 0;
}
- setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
+ setfullscreen(c, !c->isfullscreen);
} \ No newline at end of file