summary refs log tree commit diff
path: root/calmwm.c
diff options
context:
space:
mode:
authoroga <oga>2009-12-07 23:19:51 +0000
committeroga <oga>2009-12-07 23:19:51 +0000
commitaa88d5848e0b3ee3ea7c64c7582eddd963dcecb2 (patch)
treec1a5ead28fa7e68875113d9c20db450c4b2110e3 /calmwm.c
parent728d2a40dd4e0151c6473179d35ca08fd0a0f1b4 (diff)
downloadcwm-aa88d5848e0b3ee3ea7c64c7582eddd963dcecb2.tar.gz
cwm-aa88d5848e0b3ee3ea7c64c7582eddd963dcecb2.tar.xz
cwm-aa88d5848e0b3ee3ea7c64c7582eddd963dcecb2.zip
Implement _NET_NUMBER_OF_DESKTOPS, currently this is statically 9 and
unchangable. the group code needs some cleaning up before this will be a
bit less hackish.

ok okan@
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/calmwm.c b/calmwm.c
index a41c772..37fa473 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -147,7 +147,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
 	XWindowAttributes	 winattr;
 	XSetWindowAttributes	 rootattr;
 	int			 fake;
-	u_int			 nwins, i;
+	u_int			 ndesks = CALMWM_NGROUPS, nwins, i;
 
 	Curscreen = sc;
 
@@ -166,6 +166,13 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
 	/* Initialize menu window. */
 	menu_init(sc);
 
+	/*
+	 * XXX this probably should be somewhere else, but since it's a 
+	 * static value for now it does ok.
+	 */
+	XChangeProperty(X_Dpy, sc->rootwin, _NET_NUMBER_OF_DESKTOPS,
+	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&ndesks, 1);
+
 	xu_setwmname(sc);
 
 	/* Deal with existing clients. */