summary refs log tree commit diff
path: root/calmwm.c
diff options
context:
space:
mode:
authoroga <oga>2009-12-10 23:14:58 +0000
committeroga <oga>2009-12-10 23:14:58 +0000
commita7c3a7cac323e5522f70f6f4fb3c6eb6607d1b99 (patch)
tree535c480fb7c21312b69505a81e145a61fbca0ca4 /calmwm.c
parent134e777cf095ae292730e1c9d3f7967099878024 (diff)
downloadcwm-a7c3a7cac323e5522f70f6f4fb3c6eb6607d1b99.tar.gz
cwm-a7c3a7cac323e5522f70f6f4fb3c6eb6607d1b99.tar.xz
cwm-a7c3a7cac323e5522f70f6f4fb3c6eb6607d1b99.zip
Implement _NET_CURRENT_DESKTOP, _NET_DESKTOP_VIEWPORT and
_NET_DESKTOP_GEOMETRY.

ok okan@
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/calmwm.c b/calmwm.c
index 4bd1567..5824441 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -143,12 +143,12 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
 	XWindowAttributes	 winattr;
 	XSetWindowAttributes	 rootattr;
 	int			 fake;
-	u_int			 ndesks = CALMWM_NGROUPS, nwins, i;
-
+	u_int			 nwins, i;
 	sc->which = which;
 	sc->rootwin = RootWindow(X_Dpy, sc->which);
-	sc->xmax = DisplayWidth(X_Dpy, sc->which);
-	sc->ymax = DisplayHeight(X_Dpy, sc->which);
+
+	screen_update_geometry(sc, DisplayWidth(X_Dpy, sc->which),
+	    DisplayHeight(X_Dpy, sc->which));
 
 	conf_color(&Conf, sc);
 
@@ -161,13 +161,6 @@ 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. */