aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/dmenu.c b/dmenu.c
index 9b6a382..a5a4cdd 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -39,6 +39,10 @@ static void setup(void);
39static void usage(void); 39static void usage(void);
40 40
41static char text[BUFSIZ]; 41static char text[BUFSIZ];
42static int bh, mw, mh;
43static int inputw = 0;
44static int promptw;
45static int lines = 0;
42static size_t cursor = 0; 46static size_t cursor = 0;
43static const char *font = NULL; 47static const char *font = NULL;
44static const char *prompt = NULL; 48static const char *prompt = NULL;
@@ -46,10 +50,6 @@ static const char *normbgcolor = "#cccccc";
46static const char *normfgcolor = "#000000"; 50static const char *normfgcolor = "#000000";
47static const char *selbgcolor = "#0066ff"; 51static const char *selbgcolor = "#0066ff";
48static const char *selfgcolor = "#ffffff"; 52static const char *selfgcolor = "#ffffff";
49static unsigned int bh, mw, mh;
50static unsigned int inputw = 0;
51static unsigned int lines = 0;
52static unsigned int promptw;
53static unsigned long normcol[ColLast]; 53static unsigned long normcol[ColLast];
54static unsigned long selcol[ColLast]; 54static unsigned long selcol[ColLast];
55static Atom utf8; 55static Atom utf8;
@@ -444,6 +444,7 @@ setup(void) {
444 444
445 /* menu geometry */ 445 /* menu geometry */
446 bh = dc->font.height + 2; 446 bh = dc->font.height + 2;
447 lines = MAX(lines, 0);
447 mh = (lines + 1) * bh; 448 mh = (lines + 1) * bh;
448#ifdef XINERAMA 449#ifdef XINERAMA
449 if((info = XineramaQueryScreens(dc->dpy, &n))) { 450 if((info = XineramaQueryScreens(dc->dpy, &n))) {