diff options
author | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2007-12-13 02:16:49 +0000 |
---|---|---|
committer | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2007-12-13 02:16:49 +0000 |
commit | 3e10817e2c4cae7038d738e4cd5d00074efb59a3 (patch) | |
tree | af225d38c56d6109a5e7aa716607afe1c612b77a /main.c | |
parent | ea71fbbac344861b7d7b41af05f17cad297a5cae (diff) | |
download | dzen-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.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 + ); } } |