dwm/patch/togglefullscreen.c

25 lines
493 B
C
Raw Normal View History

2019-09-05 23:27:33 +02:00
void
2019-11-21 12:09:05 +01:00
togglefullscreen(const Arg *arg)
{
2020-09-05 14:20:53 +02:00
Client *c = selmon->sel;
if (!c)
return;
2019-09-05 23:27:33 +02:00
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
2020-09-05 14:20:53 +02:00
if (c->fakefullscreen == 1) {
c->fakefullscreen = 2;
if (c->isfullscreen)
c->isfullscreen = 0;
} else if (c->fakefullscreen == 2) {
c->fakefullscreen = 0;
togglefakefullscreen(NULL);
arrange(selmon);
return;
}
#endif // FAKEFULLSCREEN_CLIENT_PATCH
2019-11-21 12:09:05 +01:00
2020-09-05 14:20:53 +02:00
setfullscreen(c, !c->isfullscreen);
if (!c->isfullscreen)
arrange(c->mon);
}