tHandle multiple callbacks based on type - glazier - window management experiments
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit f910946ea78143e8006627eb2b3a920ba769637d
 (DIR) parent 8c0d33f83684834e2f4439c0a85232b55689e784
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Fri, 18 Oct 2019 22:30:11 +0200
       
       Handle multiple callbacks based on type
       
       Diffstat:
         M glazier.c                           |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/glazier.c b/glazier.c
       t@@ -44,8 +44,8 @@ ev_callback(xcb_generic_event_t *ev)
        
                type = ev->response_type & ~0x80;
                for (i=0; i<LEN(cb); i++)
       -                if (type == cb->type)
       -                        return cb->handle(ev);
       +                if (type == cb[i].type)
       +                        return cb[i].handle(ev);
        
                return 1;
        }