glazier

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

commit 981007fd922d9993e977c68f6baf245ae711ed76
parent 30296f3a9a8bea3077b990626006ec8cf3194c44
Author: Willy Goiffon <dev@z3bra.org>
Date:   Sat, 26 Oct 2019 10:50:52 +0200

Use local variable when adopting windows

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

diff --git a/glazier.c b/glazier.c @@ -120,19 +120,20 @@ static int takeover() { int i, n; - xcb_window_t *orphans; + xcb_window_t *orphans, wid; n = wm_get_windows(scrn->root, &orphans); for (i = 0; i < n; i++) { - if (wm_is_ignored(orphans[i])) + wid = orphans[i]; + if (wm_is_ignored(wid)) continue; if (verbose) - fprintf(stderr, "Adoptint 0x%08x\n", orphans[i]); + fprintf(stderr, "Adopting 0x%08x\n", wid); - adopt(orphans[i]); - if (wm_is_mapped(orphans[i])) + adopt(wid); + if (wm_is_mapped(wid)) wm_set_border(border, border_color, wid); }