added urgent border patch, fixed sticky patch

This commit is contained in:
2020-07-02 13:18:35 +02:00
parent 4fcccf1fe1
commit 7936509652
3 changed files with 64 additions and 2 deletions

8
dwm.c
View File

@@ -59,7 +59,7 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel }; /* color schemes */
enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
@@ -215,6 +215,7 @@ static void togglefloating(const Arg *arg);
static void togglefullscr(const Arg *arg);
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
static void togglesticky(const Arg *arg);
static void unfocus(Client *c, int setfocus);
static void unmanage(Client *c, int destroyed);
static void unmapnotify(XEvent *e);
@@ -2054,8 +2055,11 @@ updatewmhints(Client *c)
if (c == selmon->sel && wmh->flags & XUrgencyHint) {
wmh->flags &= ~XUrgencyHint;
XSetWMHints(dpy, c->win, wmh);
} else
} else {
c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
if (c->isurgent)
XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel);
}
if (wmh->flags & InputHint)
c->neverfocus = !wmh->input;
else