From cdc4d51fee8aea8a5b7ecc8ba165457d519df061 Mon Sep 17 00:00:00 2001 From: phillbush Date: Wed, 27 May 2020 15:10:53 -0300 Subject: [PATCH] removed a goto --- xmenu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmenu.c b/xmenu.c index 116f31d..5b41cb0 100644 --- a/xmenu.c +++ b/xmenu.c @@ -555,7 +555,8 @@ mapmenu(struct Menu *currmenu) /* if this is the first time mapping, skip calculations */ if (prevmenu == NULL) { XMapWindow(dpy, currmenu->win); - goto done; + prevmenu = currmenu; + return; } /* find lowest common ancestor menu */ @@ -587,7 +588,6 @@ mapmenu(struct Menu *currmenu) XMapWindow(dpy, menu->win); } -done: prevmenu = currmenu; } @@ -611,7 +611,7 @@ drawitem(struct Menu *menu, struct Item *item, XftColor *color) { int x, y; - x = 0 + dc.font->height; + x = dc.font->height; y = item->y + item->h/2 + dc.font->ascent/2 - 1; XSetForeground(dpy, dc.gc, color[ColorFG].pixel); XftDrawStringUtf8(menu->draw, &color[ColorFG], dc.font,