summary refs log tree commit diff
diff options
context:
space:
mode:
authoroga <oga>2009-12-10 23:21:26 +0000
committeroga <oga>2009-12-10 23:21:26 +0000
commit9b04930f24bb3acc3626f442eff074b6b80821f3 (patch)
tree1e5bd5d94937565cf8a9eed2eb0b7499ffac2038
parenta7c3a7cac323e5522f70f6f4fb3c6eb6607d1b99 (diff)
downloadcwm-9b04930f24bb3acc3626f442eff074b6b80821f3.tar.gz
cwm-9b04930f24bb3acc3626f442eff074b6b80821f3.tar.xz
cwm-9b04930f24bb3acc3626f442eff074b6b80821f3.zip
Implement _NET_VIRTUAL_ROOTS (just clear it, we don't use that technique)
and _NET_SHOWING_DESKTOP (we're never doing so right now).

only three informational root-window hints to go.

ok okan@
-rw-r--r--calmwm.h4
-rw-r--r--group.c15
-rw-r--r--xutil.c2
3 files changed, 19 insertions, 2 deletions
diff --git a/calmwm.h b/calmwm.h
index 8e4b3ab..22210aa 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -536,7 +536,9 @@ extern struct conf			 Conf;
 #define	_NET_CURRENT_DESKTOP		 cwm_atoms[13]
 #define	_NET_DESKTOP_VIEWPORT		 cwm_atoms[14]
 #define	_NET_DESKTOP_GEOMETRY		 cwm_atoms[15]
-#define CWM_NO_ATOMS			 16
+#define	_NET_VIRTUAL_ROOTS		 cwm_atoms[16]
+#define	_NET_SHOWING_DESKTOP		 cwm_atoms[17]
+#define CWM_NO_ATOMS			 18
 #define CWM_NETWM_START			 7
 
 extern Atom				 cwm_atoms[CWM_NO_ATOMS];
diff --git a/group.c b/group.c
index 78c9e51..e7a21cc 100644
--- a/group.c
+++ b/group.c
@@ -126,7 +126,8 @@ void
 group_init(struct screen_ctx *sc)
 {
 	int	 	 i;
-	u_int32_t	 viewports[2] = {0, 0}, ndesks = CALMWM_NGROUPS;
+	u_int32_t	 viewports[2] = {0, 0};
+	u_int32_t	 ndesks = CALMWM_NGROUPS, zero = 0;
 
 	TAILQ_INIT(&sc->groupq);
 	sc->group_hideall = 0;
@@ -144,6 +145,18 @@ group_init(struct screen_ctx *sc)
 	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)viewports, 2);
 	XChangeProperty(X_Dpy, sc->rootwin, _NET_NUMBER_OF_DESKTOPS,
 	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&ndesks, 1);
+	/*
+	 * we don't use virtual roots, so make sure it's not there from a 
+	 * previous wm.
+	 */
+	XDeleteProperty(X_Dpy, sc->rootwin, _NET_VIRTUAL_ROOTS);
+	/*
+	 * We don't really have a ``showing desktop'' mode, so this is zero
+	 * always. XXX Note that when we hide all groups, or when all groups
+	 * are hidden we could technically set this later on.
+	 */
+	XChangeProperty(X_Dpy, sc->rootwin, _NET_SHOWING_DESKTOP,
+	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&zero, 1);
 	group_setactive(sc, 0);
 }
 
diff --git a/xutil.c b/xutil.c
index 727fd37..a9e2453 100644
--- a/xutil.c
+++ b/xutil.c
@@ -187,6 +187,8 @@ char 		*atoms[CWM_NO_ATOMS] = {
 	"_NET_CURRENT_DESKTOP",
 	"_NET_DESKTOP_VIEWPORT",
 	"_NET_DESKTOP_GEOMETRY",
+	"_NET_VIRTUAL_ROOTS",
+	"_NET_SHOWING_DESKTOP",
 };
 
 void