glazier

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

commit 0d2d4a8fe22fe734a68e335c4c9f604cc831232e
parent 53f2e3b0dc983d47096488c9b4676f37f8db0628
Author: Willy Goiffon <dev@z3bra.org>
Date:   Wed, 23 Oct 2019 21:11:07 +0200

Use adopt() function for newly created windows

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

diff --git a/glazier.c b/glazier.c @@ -153,7 +153,6 @@ cb_default(xcb_generic_event_t *ev) static int cb_create(xcb_generic_event_t *ev) { - int x, y, w, h; xcb_create_notify_event_t *e; e = (xcb_create_notify_event_t *)ev; @@ -164,11 +163,7 @@ cb_create(xcb_generic_event_t *ev) if (verbose) fprintf(stderr, "%s 0x%08x\n", XEV(e), e->window); - w = wm_get_attribute(e->window, ATTR_W); - h = wm_get_attribute(e->window, ATTR_H); - wm_get_cursor(0, scrn->root, &x, &y); - wm_teleport(e->window, x - w/2, y - h/2, w, h); - wm_reg_event(e->window, XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_STRUCTURE_NOTIFY); + adopt(e->window); return 0; }