2019-11-21 12:15:16 +01:00
|
|
|
void
|
|
|
|
togglefakefullscreen(const Arg *arg)
|
|
|
|
{
|
2020-09-05 14:20:53 +02:00
|
|
|
Client *c = selmon->sel;
|
|
|
|
if (!c)
|
2019-11-21 12:15:16 +01:00
|
|
|
return;
|
|
|
|
|
2020-09-05 14:20:53 +02:00
|
|
|
if (c->fakefullscreen) {
|
|
|
|
if (c->isfullscreen)
|
|
|
|
c->fakefullscreen = 0;
|
2019-11-21 12:15:16 +01:00
|
|
|
else
|
2020-09-05 14:20:53 +02:00
|
|
|
c->isfullscreen = 0;
|
2019-11-21 12:15:16 +01:00
|
|
|
} else {
|
2020-09-05 14:20:53 +02:00
|
|
|
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);
|
2019-11-22 09:21:56 +01:00
|
|
|
}
|
2020-09-05 14:20:53 +02:00
|
|
|
c->fakefullscreen = 1;
|
|
|
|
c->isfullscreen = 0;
|
2019-11-21 12:15:16 +01:00
|
|
|
}
|
2020-09-05 14:20:53 +02:00
|
|
|
setfullscreen(c, !c->isfullscreen);
|
2019-11-21 12:15:16 +01:00
|
|
|
}
|