reverting keyboard grab to root window - invoking several dmenu's now works again...
[dmenu.git] / main.c
diff --git a/main.c b/main.c
index b733feb..0f07773 100644 (file)
--- a/main.c
+++ b/main.c
@@ -203,7 +203,7 @@ match(char *pattern) {
 static void
 kpress(XKeyEvent * e) {
        char buf[32];
-       int i, num, prev_nitem;
+       int i, num;
        unsigned int len;
        KeySym ksym;
 
@@ -493,6 +493,8 @@ main(int argc, char *argv[]) {
        dc.drawable = XCreatePixmap(dpy, root, mw, mh, DefaultDepth(dpy, screen));
        dc.gc = XCreateGC(dpy, root, 0, 0);
        XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
+       if(!dc.font.set)
+               XSetFont(dpy, dc.gc, dc.font.xfont->fid);
        if(maxname)
                cmdw = textw(maxname);
        if(cmdw > mw / 3)