aboutsummaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/dmenu.c b/dmenu.c
index 839f6cc..4e286cf 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -610,13 +610,12 @@ static void
610setup(void) 610setup(void)
611{ 611{
612 int x, y, i, j; 612 int x, y, i, j;
613 unsigned int du, tmp; 613 unsigned int du;
614 XSetWindowAttributes swa; 614 XSetWindowAttributes swa;
615 XIM xim; 615 XIM xim;
616 Window w, dw, *dws; 616 Window w, dw, *dws;
617 XWindowAttributes wa; 617 XWindowAttributes wa;
618 XClassHint ch = {"dmenu", "dmenu"}; 618 XClassHint ch = {"dmenu", "dmenu"};
619 struct item *item;
620#ifdef XINERAMA 619#ifdef XINERAMA
621 XineramaScreenInfo *info; 620 XineramaScreenInfo *info;
622 Window pw; 621 Window pw;
@@ -674,12 +673,7 @@ setup(void)
674 mw = wa.width; 673 mw = wa.width;
675 } 674 }
676 promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0; 675 promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
677 for (item = items; item && item->text; ++item) { 676 inputw = mw / 3; /* input width: ~30% of monitor width */
678 if ((tmp = textw_clamp(item->text, mw/3)) > inputw) {
679 if ((inputw = tmp) == mw/3)
680 break;
681 }
682 }
683 match(); 677 match();
684 678
685 /* create menu window */ 679 /* create menu window */