aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroga2009-12-11 18:09:16 +0000
committeroga2009-12-11 18:09:16 +0000
commit7a6ee251e12824ed1a8e974ad238c9e7023b4a0d (patch)
tree960e62c86f49d17c202a26b67f7cfeb59d9f11c9
parentf73eddcff9e4ed14f03cd8b9afeef54822633ba9 (diff)
downloadcwm-7a6ee251e12824ed1a8e974ad238c9e7023b4a0d.tar.gz
add _NET_WORKAREA. for now we ignore the gap, this'll change soonish.
ok okan@
Diffstat (limited to '')
-rw-r--r--calmwm.h5
-rw-r--r--screen.c17
-rw-r--r--xutil.c3
3 files changed, 20 insertions, 5 deletions
diff --git a/calmwm.h b/calmwm.h
index efd9d2a..902ea57 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -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.
*
- * $Id: calmwm.h,v 1.108 2009/12/11 17:55:42 oga Exp $
+ * $Id: calmwm.h,v 1.109 2009/12/11 18:09:16 oga Exp $
*/
#ifndef _CALMWM_H_
@@ -542,7 +542,8 @@ extern struct conf Conf;
#define _NET_SHOWING_DESKTOP cwm_atoms[17]
#define _NET_DESKTOP_NAMES cwm_atoms[18]
#define _NET_WM_DESKTOP cwm_atoms[19]
-#define CWM_NO_ATOMS 20
+#define _NET_WORKAREA cwm_atoms[20]
+#define CWM_NO_ATOMS 21
#define CWM_NETWM_START 7
extern Atom cwm_atoms[CWM_NO_ATOMS];
diff --git a/screen.c b/screen.c
index 9c45f63..5deff21 100644
--- a/screen.c
+++ b/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.
*
- * $Id: screen.c,v 1.22 2009/12/11 17:57:38 oga Exp $
+ * $Id: screen.c,v 1.23 2009/12/11 18:09:16 oga Exp $
*/
#include "headers.h"
@@ -102,10 +102,23 @@ 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];
+ 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. XXX gap */
+ for (i = 0; i < CALMWM_NGROUPS; i++) {
+ workareas[i][0] = 0;
+ workareas[i][1] = 0;
+ workareas[i][2] = width;
+ workareas[i][3] = height;
+ }
+
+ XChangeProperty(X_Dpy, sc->rootwin, _NET_WORKAREA,
+ XA_CARDINAL, 32, PropModeReplace,
+ (unsigned char *)workareas, CALMWM_NGROUPS * 4);
}
diff --git a/xutil.c b/xutil.c
index bbd35ec..635eb2e 100644
--- a/xutil.c
+++ b/xutil.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.
*
- * $Id: xutil.c,v 1.25 2009/12/11 17:55:42 oga Exp $
+ * $Id: xutil.c,v 1.26 2009/12/11 18:09:16 oga Exp $
*/
#include "headers.h"
@@ -191,6 +191,7 @@ char *atoms[CWM_NO_ATOMS] = {
"_NET_SHOWING_DESKTOP",
"_NET_DESKTOP_NAMES",
"_NET_WM_DESKTOP",
+ "_NET_WORKAREA",
};
void