dwm/patch/fakefullscreenclient.c

27 lines
638 B
C
Raw Normal View History

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);
}
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
}