diff --git a/dwm-flexipatch/dwm.c b/dwm-flexipatch/dwm.c index a577f85..d80cc48 100644 --- a/dwm-flexipatch/dwm.c +++ b/dwm-flexipatch/dwm.c @@ -2711,11 +2711,11 @@ motionnotify(XEvent *e) #if !FOCUSONCLICK_PATCH static Monitor *mon = NULL; Monitor *m; - #endif // FOCUSONCLICK_PATCH - Bar *bar; #if LOSEFULLSCREEN_PATCH Client *sel; #endif // LOSEFULLSCREEN_PATCH + #endif // FOCUSONCLICK_PATCH + Bar *bar; XMotionEvent *ev = &e->xmotion; if ((bar = wintobar(ev->window))) { @@ -4380,13 +4380,24 @@ unfocus(Client *c, int setfocus, Client *nextfocus) selmon->pertag->prevclient[selmon->pertag->curtag] = c; #endif // SWAPFOCUS_PATCH #if LOSEFULLSCREEN_PATCH - if (c->isfullscreen && ISVISIBLE(c) && c->mon == selmon && nextfocus && !nextfocus->isfloating) + if (c->isfullscreen && ISVISIBLE(c) && c->mon == selmon && nextfocus && !nextfocus->isfloating) { + #if RENAMED_SCRATCHPADS_PATCH && RENAMED_SCRATCHPADS_AUTO_HIDE_PATCH + #if FAKEFULLSCREEN_CLIENT_PATCH + if (c->scratchkey != 0 && c->fakefullscreen != 1) + togglescratch(&((Arg) {.v = (const char*[]){ &c->scratchkey, NULL } })); + #else + if (c->scratchkey != 0) + togglescratch(&((Arg) {.v = (const char*[]){ &c->scratchkey, NULL } })); + #endif // FAKEFULLSCREEN_CLIENT_PATCH + else + #endif // RENAMED_SCRATCHPADS_AUTO_HIDE_PATCH #if FAKEFULLSCREEN_CLIENT_PATCH if (c->fakefullscreen != 1) setfullscreen(c, 0); #else setfullscreen(c, 0); #endif // #if FAKEFULLSCREEN_CLIENT_PATCH + } #endif // LOSEFULLSCREEN_PATCH grabbuttons(c, 0); #if !BAR_FLEXWINTITLE_PATCH diff --git a/dwm-flexipatch/patch/renamed_scratchpads.c b/dwm-flexipatch/patch/renamed_scratchpads.c index db99723..9bf3f22 100644 --- a/dwm-flexipatch/patch/renamed_scratchpads.c +++ b/dwm-flexipatch/patch/renamed_scratchpads.c @@ -66,12 +66,13 @@ togglescratch(const Arg *arg) if (c->scratchkey != ((char**)arg->v)[0][0]) continue; - /* awesomebar / wintitleactions compatibility, unhide scratchpad if hidden + #if BAR_WINTITLEACTIONS_PATCH + /* unhide scratchpad if hidden */ if (HIDDEN(c)) { XMapWindow(dpy, c->win); setclientstate(c, NormalState); } - */ + #endif // BAR_WINTITLEACTIONS_PATCH /* Record the first found scratchpad client for focus purposes, but prioritise the scratchpad on the current monitor if one exists */ @@ -148,4 +149,3 @@ togglescratch(const Arg *arg) spawnscratch(arg); } } -