tDefine menu size based on menu entries - xmenu - drop-down menu for X11
 (HTM) git clone git://git.z3bra.org/xmenu.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 8bac6abcc55ccd2e2a7e20349aa87362becbd683
 (DIR) parent 9ecad90506da66bd70fa52789aa60e8af79f5a02
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Wed, 20 Nov 2019 08:53:16 +0100
       
       Define menu size based on menu entries
       
       Diffstat:
         M config.def.h                        |       4 ----
         M xmenu.c                             |       2 +-
       
       2 files changed, 1 insertion(+), 5 deletions(-)
       ---
 (DIR) diff --git a/config.def.h b/config.def.h
       t@@ -1,7 +1,3 @@
       -/* original window size */
       -int width  = 128;
       -int height = 256;
       -
        /* widget colors, given as RGB hex values */
        uint32_t background = 0x3f3f3f;
        uint32_t foreground = 0xc1eafe;
 (DIR) diff --git a/xmenu.c b/xmenu.c
       t@@ -125,7 +125,7 @@ main(int argc, char *argv[])
        
                wid = xcb_generate_id(dpy);
                xcb_create_window(dpy, screen->root_depth, wid, screen->root,
       -                0, 0, width, height, 0,
       +                0, 0, maxwidth * 1.2, maxheight * nent * 2.5, 0,
                        XCB_WINDOW_CLASS_INPUT_OUTPUT, screen->root_visual, mask, val);
        
                xcb_map_window(dpy, wid);