aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Lane Smith2011-05-15 14:21:00 +0100
committerConnor Lane Smith2011-05-15 14:21:00 +0100
commit4776d6dc6148498a1eab11dd3a15c03736f15d42 (patch)
tree2f131c6f88c6b9a554c06b77f7dc762539e42db9
parentd0051e7bb858815866fbaf3a8fd5b50319c0c86d (diff)
match first
-rw-r--r--dmenu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/dmenu.c b/dmenu.c
index d54b1b3..d0ed966 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -530,6 +530,10 @@ setup(void) {
y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh;
mw = DisplayWidth(dc->dpy, screen);
}
+ inputw = MIN(inputw, mw/3);
+ promptw = prompt ? textw(dc, prompt) : 0;
+ match();
+
/* menu window */
wa.override_redirect = True;
wa.background_pixmap = ParentRelative;
@@ -539,10 +543,7 @@ setup(void) {
DefaultVisual(dc->dpy, screen),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
- resizedc(dc, mw, mh);
- inputw = MIN(inputw, mw/3);
- promptw = prompt ? textw(dc, prompt) : 0;
XMapRaised(dc->dpy, win);
+ resizedc(dc, mw, mh);
drawmenu();
- match();
}