aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-12-13 02:16:49 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-12-13 02:16:49 +0000
commit3e10817e2c4cae7038d738e4cd5d00074efb59a3 (patch)
treeaf225d38c56d6109a5e7aa716607afe1c612b77a /main.c
parentea71fbbac344861b7d7b41af05f17cad297a5cae (diff)
downloaddzen-3e10817e2c4cae7038d738e4cd5d00074efb59a3.tar.gz
dzen-3e10817e2c4cae7038d738e4cd5d00074efb59a3.zip
added additional _NET_WM_STRUT support
git-svn-id: http://dzen.googlecode.com/svn/trunk@172 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/main.c b/main.c
index a371f23..46c40ce 100644
--- a/main.c
+++ b/main.c
@@ -284,6 +284,7 @@ queryscreeninfo(Display *dpy, XRectangle *rect, int screen) {
static void
set_net_wm_strut_partial_for(Display *dpy, Window w) {
unsigned long strut[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ unsigned long strut_s[4] = { 0, 0, 0, 0 };
XWindowAttributes wa;
XGetWindowAttributes(dpy, w, &wa);
@@ -292,11 +293,15 @@ set_net_wm_strut_partial_for(Display *dpy, Window w) {
strut[2] = wa.height;
strut[8] = wa.x;
strut[9] = wa.x + wa.width - 1;
+
+ strut_s[2] = wa.height;
}
else if((wa.y + wa.height) == DisplayHeight(dpy, DefaultScreen(dpy))) {
strut[3] = wa.height;
strut[10] = wa.x;
strut[11] = wa.x + wa.width - 1;
+
+ strut_s[3] = wa.height;
}
if(strut[2] != 0 || strut[3] != 0) {
@@ -310,6 +315,16 @@ set_net_wm_strut_partial_for(Display *dpy, Window w) {
(unsigned char *)&strut,
12
);
+ XChangeProperty(
+ dpy,
+ w,
+ XInternAtom(dpy, "_NET_WM_STRUT", False),
+ XInternAtom(dpy, "CARDINAL", False),
+ 32,
+ PropModeReplace,
+ (unsigned char *)&strut,
+ 4
+ );
}
}