summaryrefslogtreecommitdiff
path: root/app/cwm/screen.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2012-07-03 13:49:04 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2012-07-03 13:49:04 +0000
commit7363d0cd84fa46fa99f94ca25dde05be66660338 (patch)
treedc895b9c668c99b65aff737ea9bda89006887496 /app/cwm/screen.c
parent6b78a77383d37e1695d9cc42078de86225cd7b9d (diff)
re-implement atom handing; makes for a normalized and more consistent
separation between cwm and ewmh. seen by a few.
Diffstat (limited to 'app/cwm/screen.c')
-rw-r--r--app/cwm/screen.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/app/cwm/screen.c b/app/cwm/screen.c
index d33ed532e..815acb58d 100644
--- a/app/cwm/screen.c
+++ b/app/cwm/screen.c
@@ -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);
}