tUse adopt() function for newly created windows - glazier - window management experiments
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 0d2d4a8fe22fe734a68e335c4c9f604cc831232e
 (DIR) parent 53f2e3b0dc983d47096488c9b4676f37f8db0628
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Wed, 23 Oct 2019 21:11:07 +0200
       
       Use adopt() function for newly created windows
       
       Diffstat:
         M glazier.c                           |       7 +------
       
       1 file changed, 1 insertion(+), 6 deletions(-)
       ---
 (DIR) diff --git a/glazier.c b/glazier.c
       t@@ -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;
       t@@ -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;
        }