commit - 33685b06e9332638769e677e77b257e24e069fd1
commit + e1e1de7b3b8399cba90ddca9613f837b2dbef7b9
blob - 839f6ccd935f2755afa81afc7549ea95bc7b93aa
blob + 4e286cf05c59c643b24a0316f354aa5ad45851ce
--- dmenu.c
+++ dmenu.c
setup(void)
{
int x, y, i, j;
- unsigned int du, tmp;
+ unsigned int du;
XSetWindowAttributes swa;
XIM xim;
Window w, dw, *dws;
XWindowAttributes wa;
XClassHint ch = {"dmenu", "dmenu"};
- struct item *item;
#ifdef XINERAMA
XineramaScreenInfo *info;
Window pw;
mw = wa.width;
}
promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
- for (item = items; item && item->text; ++item) {
- if ((tmp = textw_clamp(item->text, mw/3)) > inputw) {
- if ((inputw = tmp) == mw/3)
- break;
- }
- }
+ inputw = mw / 3; /* input width: ~30% of monitor width */
match();
/* create menu window */