togglefloating RENAMED_SCRATCHPADS_PATCH colour fix (#428)

Co-authored-by: Ampnbsp <Ampnbsp@email.org>
This commit is contained in:
Ampnbsp 2024-06-06 19:21:10 +00:00 committed by bakkeby
parent 66770cfbcc
commit edb36a3a14

11
dwm.c
View File

@ -4284,10 +4284,21 @@ togglefloating(const Arg *arg)
#endif // !FAKEFULLSCREEN_PATCH #endif // !FAKEFULLSCREEN_PATCH
c->isfloating = !c->isfloating || c->isfixed; c->isfloating = !c->isfloating || c->isfixed;
#if !BAR_FLEXWINTITLE_PATCH #if !BAR_FLEXWINTITLE_PATCH
#if RENAMED_SCRATCHPADS_PATCH
if (c->scratchkey != 0 && c->isfloating)
XSetWindowBorder(dpy, c->win, scheme[SchemeScratchSel][ColFloat].pixel);
else if (c->scratchkey != 0)
XSetWindowBorder(dpy, c->win, scheme[SchemeScratchSel][ColBorder].pixel);
else if (c->isfloating)
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel);
else
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
#else
if (c->isfloating) if (c->isfloating)
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel); XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel);
else else
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
#endif // RENAMED_SCRATCHPADS_PATCH
#endif // BAR_FLEXWINTITLE_PATCH #endif // BAR_FLEXWINTITLE_PATCH
if (c->isfloating) { if (c->isfloating) {
#if SAVEFLOATS_PATCH || EXRESIZE_PATCH #if SAVEFLOATS_PATCH || EXRESIZE_PATCH