2019-11-21 12:15:16 +01:00
|
|
|
void
|
|
|
|
togglefakefullscreen(const Arg *arg)
|
|
|
|
{
|
2020-09-10 09:41:00 +02:00
|
|
|
Client *c = selmon->sel;
|
|
|
|
if (!c)
|
|
|
|
return;
|
2019-11-21 12:15:16 +01:00
|
|
|
|
2020-09-10 09:41:00 +02:00
|
|
|
if (c->fakefullscreen) {
|
|
|
|
if (c->isfullscreen) {
|
|
|
|
if (c->isfloating && c->fakefullscreen == 1) {
|
|
|
|
c->oldstate = c->isfloating;
|
|
|
|
c->oldx = c->x;
|
|
|
|
c->oldy = c->y;
|
|
|
|
c->oldw = c->w;
|
|
|
|
c->oldh = c->h;
|
|
|
|
}
|
|
|
|
c->fakefullscreen = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
c->isfullscreen = 0;
|
|
|
|
} else {
|
|
|
|
c->fakefullscreen = 1;
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
c->isfullscreen = 0;
|
|
|
|
}
|
|
|
|
setfullscreen(c, !c->isfullscreen);
|
2019-11-21 12:15:16 +01:00
|
|
|
}
|