From e7a6916cb7087f69e36f738a1f6bfba8807e8b26 Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Sat, 19 Apr 2025 15:59:24 +0930 Subject: [PATCH] patched fullscreen --- dwm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dwm.c b/dwm.c index 1443802..39279fd 100644 --- a/dwm.c +++ b/dwm.c @@ -199,6 +199,7 @@ static void sendmon(Client *c, Monitor *m); static void setclientstate(Client *c, long state); static void setfocus(Client *c); static void setfullscreen(Client *c, int fullscreen); +static void fullscreen(const Arg *arg); static void setlayout(const Arg *arg); static void setmfact(const Arg *arg); static void setup(void); @@ -1506,6 +1507,19 @@ setfullscreen(Client *c, int fullscreen) } } +Layout *last_layout; +void +fullscreen(const Arg *arg) +{ + if (selmon->showbar) { + for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++); + setlayout(&((Arg) { .v = &layouts[2] })); + } else { + setlayout(&((Arg) { .v = last_layout })); + } + togglebar(arg); +} + void setlayout(const Arg *arg) {