diff options
author | okan <okan> | 2013-12-13 15:56:44 +0000 |
---|---|---|
committer | okan <okan> | 2013-12-13 15:56:44 +0000 |
commit | ddb67559f63d6187921a0796f43d4c8cae6707a9 (patch) | |
tree | 439f3b2ab8b8cd26df7750788dadcf56c61c737e /client.c | |
parent | 0cad4ef6e01dd4154816dde10b753ffef3c2e44b (diff) | |
parent | 91a29396e84b49fcb942bbe476ad43e727b6cbc3 (diff) | |
download | cwm-ddb67559f63d6187921a0796f43d4c8cae6707a9.tar.gz cwm-ddb67559f63d6187921a0796f43d4c8cae6707a9.tar.xz cwm-ddb67559f63d6187921a0796f43d4c8cae6707a9.zip |
cvsimport
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client.c b/client.c index 5b59fd2..a2b6322 100644 --- a/client.c +++ b/client.c @@ -103,6 +103,8 @@ client_init(Window win, struct screen_ctx *sc, int mapped) XSelectInput(X_Dpy, cc->win, ColormapChangeMask | EnterWindowMask | PropertyChangeMask | KeyReleaseMask); + XAddToSaveSet(X_Dpy, cc->win); + client_transient(cc); /* Notify client of its configuration. */ @@ -192,6 +194,7 @@ client_setactive(struct client_ctx *cc) _curcc = cc; cc->active = 1; + cc->flags &= ~CLIENT_URGENCY; client_draw_border(cc); conf_grab_mouse(cc->win); xu_ewmh_net_active_window(sc, cc->win); @@ -462,6 +465,12 @@ client_unhide(struct client_ctx *cc) } void +client_urgency(struct client_ctx *cc) +{ + cc->flags |= CLIENT_URGENCY; +} + +void client_draw_border(struct client_ctx *cc) { struct screen_ctx *sc = cc->sc; @@ -482,6 +491,9 @@ client_draw_border(struct client_ctx *cc) else pixel = sc->xftcolor[CWM_COLOR_BORDER_INACTIVE].pixel; + if (cc->flags & CLIENT_URGENCY) + pixel = sc->xftcolor[CWM_COLOR_BORDER_URGENCY].pixel; + XSetWindowBorderWidth(X_Dpy, cc->win, cc->bwidth); XSetWindowBorder(X_Dpy, cc->win, pixel); } @@ -511,6 +523,9 @@ client_wm_hints(struct client_ctx *cc) if ((cc->wmh->flags & InputHint) && (cc->wmh->input)) cc->flags |= CLIENT_INPUT; + + if ((cc->wmh->flags & XUrgencyHint)) + client_urgency(cc); } void |