glazier

the original window manipulator
Log | Files | Refs | Submodules | README | LICENSE

commit d151f75ae2a5c9a31e94520a469b7342800183f8
parent b749c3d6b70360d4adf2a20272b0b7acfb9a058a
Author: Willy Goiffon <dev@z3bra.org>
Date:   Sat, 26 Oct 2019 10:42:10 +0200

Change border in takeover() rather than adopt()

Diffstat:
glazier.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/glazier.c b/glazier.c @@ -107,9 +107,8 @@ adopt(xcb_window_t wid) h = wm_get_attribute(wid, ATTR_H); wm_get_cursor(0, scrn->root, &x, &y); wm_teleport(wid, x - w/2, y - h/2, w, h); - } else { - wm_set_border(border, border_color, wid); } + wm_reg_event(wid, XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY); @@ -130,7 +129,8 @@ takeover() continue; adopt(orphans[i]); - c++; + if (wm_is_mapped(orphans[i]) + wm_set_border(border, border_color, wid); } if (verbose)