Updated manpage, removed unused variables, etc.

• Updated manual page (removing mention to the removed -w option).
• Removed unused variables (dc.d).
• Freeing item's label and output.
This commit is contained in:
phillbush
2020-05-29 22:37:55 -03:00
parent ec4ed1ac1e
commit 6b5123e793
2 changed files with 13 additions and 25 deletions

11
xmenu.c
View File

@@ -28,7 +28,6 @@ struct DC {
XftColor border;
XftColor separator;
Drawable d;
GC gc;
XftFont *font;
};
@@ -598,14 +597,12 @@ mapmenu(struct Menu *currmenu)
static void
drawseparator(struct Menu *menu, struct Item *item)
{
int linex, liney, linew;
int y;
linex = dc.font->height;
liney = item->y + item->h/2;
linew = menu->w - dc.font->height;
y = item->y + item->h/2;
XSetForeground(dpy, dc.gc, dc.separator.pixel);
XDrawLine(dpy, menu->pixmap, dc.gc, linex, liney, linew, liney);
XDrawLine(dpy, menu->pixmap, dc.gc, 0, y, menu->w, y);
}
/* draw regular item */
@@ -821,6 +818,8 @@ freemenu(struct Menu *menu)
freemenu(item->submenu);
tmp = item;
item = item->next;
free(tmp->label);
free(tmp->output);
free(tmp);
}