Client/Event/Tag: Add XUrgencyHint support (colorize tag where there is an urgent client)

This commit is contained in:
Martin Duquesnoy
2010-04-04 15:13:02 +02:00
parent b5dd942fd1
commit 9c154fd0f3
6 changed files with 49 additions and 15 deletions

View File

@@ -457,6 +457,7 @@ propertynotify(XPropertyEvent *ev)
{
Client *c;
Window trans;
XWMHints *h;
if(ev->state == PropertyDelete)
return;
@@ -465,8 +466,7 @@ propertynotify(XPropertyEvent *ev)
{
switch(ev->atom)
{
default: break;
case XA_WM_TRANSIENT_FOR:
case XA_WM_TRANSIENT_FOR:
XGetTransientForHint(dpy, c->win, &trans);
if((c->flags & TileFlag || c->flags & MaxFlag))
if(((c->flags & HintFlag && (client_gb_win(trans) != NULL)))
@@ -476,9 +476,22 @@ propertynotify(XPropertyEvent *ev)
case XA_WM_NORMAL_HINTS:
client_size_hints(c);
break;
case XA_WM_HINTS:
if((h = XGetWMHints(dpy, c->win)) && (h->flags & XUrgencyHint))
{
c->flags |= UrgentFlag;
if(ishide(c, selscreen))
infobar_draw_taglist(c->screen);
XFree(h);
}
break;
case XA_WM_NAME:
client_get_name(c);
break;
default:
break;
}
if(ev->atom == net_atom[net_wm_name])
client_get_name(c);