about summary refs log tree commit diff
path: root/screen.c
diff options
context:
space:
mode:
authorokan <okan>2012-07-03 13:49:03 +0000
committerokan <okan>2012-07-03 13:49:03 +0000
commitf98e123bfccf2ededa1cd22dbf88bedc5e4a2ccf (patch)
tree358597219d1cfc691fad23f2062db1e613bb5e5c /screen.c
parent956c47dbeb5bf55913340d80bd0f4423a422a1e8 (diff)
downloadcwm-f98e123bfccf2ededa1cd22dbf88bedc5e4a2ccf.tar.gz
cwm-f98e123bfccf2ededa1cd22dbf88bedc5e4a2ccf.tar.xz
cwm-f98e123bfccf2ededa1cd22dbf88bedc5e4a2ccf.zip
re-implement atom handing; makes for a normalized and more consistent
separation between cwm and ewmh.  seen by a few.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/screen.c b/screen.c
index ecd8104..6711073 100644
--- a/screen.c
+++ b/screen.c
@@ -111,23 +111,9 @@ screen_find_xinerama(struct screen_ctx *sc, int x, int y)
 void
 screen_update_geometry(struct screen_ctx *sc, int width, int height)
 {
-	long	 geom[2], workareas[CALMWM_NGROUPS][4];
-	int	 i;
-
-	sc->xmax = geom[0] = width;
-	sc->ymax = geom[1] = height;
-	XChangeProperty(X_Dpy, sc->rootwin, _NET_DESKTOP_GEOMETRY,
-	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)geom , 2);
-
-	/* x, y, width, height. */
-	for (i = 0; i < CALMWM_NGROUPS; i++) {
-		workareas[i][0] = sc->gap.left;
-		workareas[i][1] = sc->gap.top;
-		workareas[i][2] = width - (sc->gap.left + sc->gap.right);
-		workareas[i][3] = height - (sc->gap.top + sc->gap.bottom);
-	}
+	sc->xmax = width;
+	sc->ymax = height;
 
-	XChangeProperty(X_Dpy, sc->rootwin, _NET_WORKAREA,
-	    XA_CARDINAL, 32, PropModeReplace,
-	    (unsigned char *)workareas, CALMWM_NGROUPS * 4);
+	xu_ewmh_net_desktop_geometry(sc);
+	xu_ewmh_net_workarea(sc);
 }