tHandle border width in CONFIGURE_REQUEST events - glazier - window management experiments
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit 4bf54c8973fc2225cd08740d431420b0d4fe2f65
(DIR) parent d5374a8600e3f98613faea3c5f1b518bbceb0d08
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Sat, 26 Oct 2019 11:30:30 +0200
Handle border width in CONFIGURE_REQUEST events
Diffstat:
M glazier.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/glazier.c b/glazier.c
t@@ -441,7 +441,7 @@ cb_focus(xcb_generic_event_t *ev)
static int
cb_configreq(xcb_generic_event_t *ev)
{
- int x, y, w, h;
+ int x, y, w, h, b;
xcb_configure_request_event_t *e;
e = (xcb_configure_request_event_t *)ev;
t@@ -456,6 +456,10 @@ cb_configreq(xcb_generic_event_t *ev)
y = wm_get_attribute(e->window, ATTR_Y);
w = wm_get_attribute(e->window, ATTR_W);
h = wm_get_attribute(e->window, ATTR_H);
+ b = wm_get_attribute(e->window, ATTR_B);
+ if (e->border_width != b)
+ wm_set_border(e->border_width, -1, e->window);
+
if (e->x != x || e->y != y || e->width != w || e->height != h)
wm_teleport(e->window, e->x, e->y, e->width, e->height);