diff options
author | okan | 2012-07-03 13:49:03 +0000 |
---|---|---|
committer | okan | 2012-07-03 13:49:03 +0000 |
commit | ddc2baea991a9aee4b138ed29436fe423d1c4d3e (patch) | |
tree | 490e677d510550663ec475c0c1ce96a49c78538a /screen.c | |
parent | d9b285478d95868143d2231edca6375c0137aba5 (diff) | |
download | cwm-ddc2baea991a9aee4b138ed29436fe423d1c4d3e.tar.gz |
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.c | 24 |
1 files changed, 5 insertions, 19 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: screen.c,v 1.28 2011/05/11 13:53:51 okan Exp $ + * $OpenBSD: screen.c,v 1.29 2012/07/03 13:49:03 okan Exp $ */ #include <sys/param.h> @@ -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); } |