commit - e7572804faa9a21a57ae298c2b153ff92d8a64ff
commit + fbce733532f90c0f6af23c0216fe47b3d40fb5c3
blob - f7b9477dfcb07004aecc47afcfa68f284de5b1f2
blob + ff71194ba3a896ee487cf979855e8b18dcb6d4f5
--- dwm.c
+++ dwm.c
static void buttonpress(XEvent *e);
static void checkotherwm(void);
static void cleanup(void);
-static void clearurgent(void);
+static void clearurgent(Client *c);
static void configure(Client *c);
static void configurenotify(XEvent *e);
static void configurerequest(XEvent *e);
}
void
-clearurgent(void) {
+clearurgent(Client *c) {
XWMHints *wmh;
- Client *c;
- for(c = clients; c; c = c->next)
- if(ISVISIBLE(c) && c->isurgent) {
- c->isurgent = False;
- if (!(wmh = XGetWMHints(dpy, c->win)))
- continue;
-
- wmh->flags &= ~XUrgencyHint;
- XSetWMHints(dpy, c->win, wmh);
- XFree(wmh);
- }
+ c->isurgent = False;
+ if(!(wmh = XGetWMHints(dpy, c->win)))
+ return;
+ wmh->flags &= ~XUrgencyHint;
+ XSetWMHints(dpy, c->win, wmh);
+ XFree(wmh);
}
void
XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]);
}
if(c) {
+ if(c->isurgent)
+ clearurgent(c);
detachstack(c);
attachstack(c);
grabbuttons(c, True);
if(mask) {
tagset[seltags] = mask;
- clearurgent();
arrange();
}
}
seltags ^= 1; /* toggle sel tagset */
if(arg->ui & TAGMASK)
tagset[seltags] = arg->ui & TAGMASK;
- clearurgent();
arrange();
}