about summary refs log tree commit diff
path: root/xutil.c
diff options
context:
space:
mode:
authorokan <okan>2013-12-13 15:56:44 +0000
committerokan <okan>2013-12-13 15:56:44 +0000
commitddb67559f63d6187921a0796f43d4c8cae6707a9 (patch)
tree439f3b2ab8b8cd26df7750788dadcf56c61c737e /xutil.c
parent0cad4ef6e01dd4154816dde10b753ffef3c2e44b (diff)
parent91a29396e84b49fcb942bbe476ad43e727b6cbc3 (diff)
downloadcwm-ddb67559f63d6187921a0796f43d4c8cae6707a9.tar.gz
cwm-ddb67559f63d6187921a0796f43d4c8cae6707a9.tar.xz
cwm-ddb67559f63d6187921a0796f43d4c8cae6707a9.zip
cvsimport
Diffstat (limited to 'xutil.c')
-rw-r--r--xutil.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xutil.c b/xutil.c
index d14a981..de7e321 100644
--- a/xutil.c
+++ b/xutil.c
@@ -333,6 +333,9 @@ xu_ewmh_handle_net_wm_state_msg(struct client_ctx *cc, int action,
 		{ _NET_WM_STATE_MAXIMIZED_HORZ,
 			CLIENT_HMAXIMIZED,
 			client_hmaximize },
+		{ _NET_WM_STATE_DEMANDS_ATTENTION,
+			CLIENT_URGENCY,
+			client_urgency },
 	};
 
 	for (i = 0; i < nitems(handlers); i++) {
@@ -366,6 +369,8 @@ xu_ewmh_restore_net_wm_state(struct client_ctx *cc)
 			client_hmaximize(cc);
 		if (atoms[i] == ewmh[_NET_WM_STATE_MAXIMIZED_VERT])
 			client_vmaximize(cc);
+		if (atoms[i] == ewmh[_NET_WM_STATE_DEMANDS_ATTENTION])
+			client_urgency(cc);
 	}
 	free(atoms);
 }
@@ -380,7 +385,8 @@ xu_ewmh_set_net_wm_state(struct client_ctx *cc)
 	atoms = xcalloc((n + _NET_WM_STATES_NITEMS), sizeof(Atom));
 	for (i = j = 0; i < n; i++) {
 		if (oatoms[i] != ewmh[_NET_WM_STATE_MAXIMIZED_HORZ] &&
-		    oatoms[i] != ewmh[_NET_WM_STATE_MAXIMIZED_VERT])
+		    oatoms[i] != ewmh[_NET_WM_STATE_MAXIMIZED_VERT] &&
+		    oatoms[i] != ewmh[_NET_WM_STATE_DEMANDS_ATTENTION])
 			atoms[j++] = oatoms[i];
 	}
 	free(oatoms);
@@ -388,6 +394,8 @@ xu_ewmh_set_net_wm_state(struct client_ctx *cc)
 		atoms[j++] = ewmh[_NET_WM_STATE_MAXIMIZED_HORZ];
 	if (cc->flags & CLIENT_VMAXIMIZED)
 		atoms[j++] = ewmh[_NET_WM_STATE_MAXIMIZED_VERT];
+	if (cc->flags & CLIENT_URGENCY)
+		atoms[j++] = ewmh[_NET_WM_STATE_DEMANDS_ATTENTION];
 	if (j > 0)
 		XChangeProperty(X_Dpy, cc->win, ewmh[_NET_WM_STATE],
 		    XA_ATOM, 32, PropModeReplace, (unsigned char *)atoms, j);