From 8758206ba35288f17da633a192d1264aa06d91ef Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Wed, 16 Nov 2016 12:00:18 +0100 Subject: [PATCH] fix: Strut end values should be inclusive --- src/x11/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 06a94493..1049b403 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -62,11 +62,11 @@ window window::reconfigure_struts(uint16_t w, uint16_t h, int16_t x, bool bottom if (bottom) { values[static_cast(strut::BOTTOM)] = h; values[static_cast(strut::BOTTOM_START_X)] = x; - values[static_cast(strut::BOTTOM_END_X)] = x + w; + values[static_cast(strut::BOTTOM_END_X)] = x + w - 1; } else { values[static_cast(strut::TOP)] = h; values[static_cast(strut::TOP_START_X)] = x; - values[static_cast(strut::TOP_END_X)] = x + w; + values[static_cast(strut::TOP_END_X)] = x + w - 1; } conn.change_property_checked(XCB_PROP_MODE_REPLACE, *this, _NET_WM_STRUT, XCB_ATOM_CARDINAL, 32, 4, values);