equal
deleted
inserted
replaced
136 static void attach(Client *c); |
136 static void attach(Client *c); |
137 static void attachstack(Client *c); |
137 static void attachstack(Client *c); |
138 static void buttonpress(XEvent *e); |
138 static void buttonpress(XEvent *e); |
139 static void checkotherwm(void); |
139 static void checkotherwm(void); |
140 static void cleanup(void); |
140 static void cleanup(void); |
141 static void clearurgent(void); |
141 static void clearurgent(Client *c); |
142 static void configure(Client *c); |
142 static void configure(Client *c); |
143 static void configurenotify(XEvent *e); |
143 static void configurenotify(XEvent *e); |
144 static void configurerequest(XEvent *e); |
144 static void configurerequest(XEvent *e); |
145 static void destroynotify(XEvent *e); |
145 static void destroynotify(XEvent *e); |
146 static void detach(Client *c); |
146 static void detach(Client *c); |
363 XSync(dpy, False); |
363 XSync(dpy, False); |
364 XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); |
364 XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); |
365 } |
365 } |
366 |
366 |
367 void |
367 void |
368 clearurgent(void) { |
368 clearurgent(Client *c) { |
369 XWMHints *wmh; |
369 XWMHints *wmh; |
370 Client *c; |
370 |
371 |
371 c->isurgent = False; |
372 for(c = clients; c; c = c->next) |
372 if(!(wmh = XGetWMHints(dpy, c->win))) |
373 if(ISVISIBLE(c) && c->isurgent) { |
373 return; |
374 c->isurgent = False; |
374 wmh->flags &= ~XUrgencyHint; |
375 if (!(wmh = XGetWMHints(dpy, c->win))) |
375 XSetWMHints(dpy, c->win, wmh); |
376 continue; |
376 XFree(wmh); |
377 |
|
378 wmh->flags &= ~XUrgencyHint; |
|
379 XSetWMHints(dpy, c->win, wmh); |
|
380 XFree(wmh); |
|
381 } |
|
382 } |
377 } |
383 |
378 |
384 void |
379 void |
385 configure(Client *c) { |
380 configure(Client *c) { |
386 XConfigureEvent ce; |
381 XConfigureEvent ce; |
615 if(sel && sel != c) { |
610 if(sel && sel != c) { |
616 grabbuttons(sel, False); |
611 grabbuttons(sel, False); |
617 XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]); |
612 XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]); |
618 } |
613 } |
619 if(c) { |
614 if(c) { |
|
615 if(c->isurgent) |
|
616 clearurgent(c); |
620 detachstack(c); |
617 detachstack(c); |
621 attachstack(c); |
618 attachstack(c); |
622 grabbuttons(c, True); |
619 grabbuttons(c, True); |
623 XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); |
620 XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); |
624 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); |
621 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); |
1498 toggleview(const Arg *arg) { |
1495 toggleview(const Arg *arg) { |
1499 unsigned int mask = tagset[seltags] ^ (arg->ui & TAGMASK); |
1496 unsigned int mask = tagset[seltags] ^ (arg->ui & TAGMASK); |
1500 |
1497 |
1501 if(mask) { |
1498 if(mask) { |
1502 tagset[seltags] = mask; |
1499 tagset[seltags] = mask; |
1503 clearurgent(); |
|
1504 arrange(); |
1500 arrange(); |
1505 } |
1501 } |
1506 } |
1502 } |
1507 |
1503 |
1508 void |
1504 void |
1671 if((arg->ui & TAGMASK) == tagset[seltags]) |
1667 if((arg->ui & TAGMASK) == tagset[seltags]) |
1672 return; |
1668 return; |
1673 seltags ^= 1; /* toggle sel tagset */ |
1669 seltags ^= 1; /* toggle sel tagset */ |
1674 if(arg->ui & TAGMASK) |
1670 if(arg->ui & TAGMASK) |
1675 tagset[seltags] = arg->ui & TAGMASK; |
1671 tagset[seltags] = arg->ui & TAGMASK; |
1676 clearurgent(); |
|
1677 arrange(); |
1672 arrange(); |
1678 } |
1673 } |
1679 |
1674 |
1680 /* There's no way to check accesses to destroyed windows, thus those cases are |
1675 /* There's no way to check accesses to destroyed windows, thus those cases are |
1681 * ignored (especially on UnmapNotify's). Other types of errors call Xlibs |
1676 * ignored (especially on UnmapNotify's). Other types of errors call Xlibs |