Sync dwm-flexipatch from bakkeby/master

This commit is contained in:
Alexis Jhon Gaspar 2023-10-05 18:24:29 +08:00
parent 69b29a8dc4
commit 657f47d1d9
2 changed files with 17 additions and 6 deletions

View file

@ -2711,11 +2711,11 @@ motionnotify(XEvent *e)
#if !FOCUSONCLICK_PATCH #if !FOCUSONCLICK_PATCH
static Monitor *mon = NULL; static Monitor *mon = NULL;
Monitor *m; Monitor *m;
#endif // FOCUSONCLICK_PATCH
Bar *bar;
#if LOSEFULLSCREEN_PATCH #if LOSEFULLSCREEN_PATCH
Client *sel; Client *sel;
#endif // LOSEFULLSCREEN_PATCH #endif // LOSEFULLSCREEN_PATCH
#endif // FOCUSONCLICK_PATCH
Bar *bar;
XMotionEvent *ev = &e->xmotion; XMotionEvent *ev = &e->xmotion;
if ((bar = wintobar(ev->window))) { if ((bar = wintobar(ev->window))) {
@ -4380,13 +4380,24 @@ unfocus(Client *c, int setfocus, Client *nextfocus)
selmon->pertag->prevclient[selmon->pertag->curtag] = c; selmon->pertag->prevclient[selmon->pertag->curtag] = c;
#endif // SWAPFOCUS_PATCH #endif // SWAPFOCUS_PATCH
#if LOSEFULLSCREEN_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 FAKEFULLSCREEN_CLIENT_PATCH
if (c->fakefullscreen != 1) if (c->fakefullscreen != 1)
setfullscreen(c, 0); setfullscreen(c, 0);
#else #else
setfullscreen(c, 0); setfullscreen(c, 0);
#endif // #if FAKEFULLSCREEN_CLIENT_PATCH #endif // #if FAKEFULLSCREEN_CLIENT_PATCH
}
#endif // LOSEFULLSCREEN_PATCH #endif // LOSEFULLSCREEN_PATCH
grabbuttons(c, 0); grabbuttons(c, 0);
#if !BAR_FLEXWINTITLE_PATCH #if !BAR_FLEXWINTITLE_PATCH

View file

@ -66,12 +66,13 @@ togglescratch(const Arg *arg)
if (c->scratchkey != ((char**)arg->v)[0][0]) if (c->scratchkey != ((char**)arg->v)[0][0])
continue; continue;
/* awesomebar / wintitleactions compatibility, unhide scratchpad if hidden #if BAR_WINTITLEACTIONS_PATCH
/* unhide scratchpad if hidden */
if (HIDDEN(c)) { if (HIDDEN(c)) {
XMapWindow(dpy, c->win); XMapWindow(dpy, c->win);
setclientstate(c, NormalState); setclientstate(c, NormalState);
} }
*/ #endif // BAR_WINTITLEACTIONS_PATCH
/* Record the first found scratchpad client for focus purposes, but prioritise the /* Record the first found scratchpad client for focus purposes, but prioritise the
scratchpad on the current monitor if one exists */ scratchpad on the current monitor if one exists */
@ -148,4 +149,3 @@ togglescratch(const Arg *arg)
spawnscratch(arg); spawnscratch(arg);
} }
} }