aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
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
+ );
}
}