Squashed commit of the following:
authorphillbush <phillbush@cock.li>
Mon, 29 Jun 2020 13:01:54 +0000 (10:01 -0300)
committerphillbush <phillbush@cock.li>
Mon, 29 Jun 2020 13:01:54 +0000 (10:01 -0300)
commit b0f37c9fdb2deb09fa7af59067d57420bfaa87ea
Author: phillbush <phillbush@cock.li>
Date:   Mon Jun 29 09:58:36 2020 -0300

    Compile time error fixes

commit e6bf27768ff2ceeafb4713e90df6a35fa2294d1b
Author: Karl Martin <karlmartin895@gmail.com>
Date:   Sun Jun 28 23:08:02 2020 -0400

    v1.01

    add: user can set gap width prefs

commit 0cca2163092b9aed2823ca65b02959440ef24f41
Author: Karl Martin <karlmartin895@gmail.com>
Date:   Sun Jun 28 23:04:10 2020 -0400

    INIT: func addition + error fix

    hack + prefs: extra x,y padding for initial menu
    add: x padding for child menus
    fix: 2x compile time errors

xmenu.c

diff --git a/xmenu.c b/xmenu.c
index 64dd46b..8dac8b9 100644 (file)
--- a/xmenu.c
+++ b/xmenu.c
@@ -9,6 +9,7 @@
 #include <X11/XKBlib.h>
 #include <X11/Xft/Xft.h>
 #include <Imlib2.h>
 #include <X11/XKBlib.h>
 #include <X11/Xft/Xft.h>
 #include <Imlib2.h>
+#include <time.h>
 
 #define PROGNAME "xmenu"
 #define ITEMPREV 0
 
 #define PROGNAME "xmenu"
 #define ITEMPREV 0
@@ -740,7 +741,7 @@ drawitem(struct Menu *menu, struct Item *item, XftColor *color)
        y = item->y + (item->h + dc.font->ascent) / 2;
        XSetForeground(dpy, dc.gc, color[ColorFG].pixel);
        XftDrawStringUtf8(menu->draw, &color[ColorFG], dc.font,
        y = item->y + (item->h + dc.font->ascent) / 2;
        XSetForeground(dpy, dc.gc, color[ColorFG].pixel);
        XftDrawStringUtf8(menu->draw, &color[ColorFG], dc.font,
-                      x, y, item->label, item->labellen);
+                      x, y, (XftChar8 *)item->label, item->labellen);
 
        /* draw triangle, if item contains a submenu */
        if (item->submenu != NULL) {
 
        /* draw triangle, if item contains a submenu */
        if (item->submenu != NULL) {