diff options
-rw-r--r-- | dmenu.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -39,6 +39,10 @@ static void setup(void); | |||
39 | static void usage(void); | 39 | static void usage(void); |
40 | 40 | ||
41 | static char text[BUFSIZ]; | 41 | static char text[BUFSIZ]; |
42 | static int bh, mw, mh; | ||
43 | static int inputw = 0; | ||
44 | static int promptw; | ||
45 | static int lines = 0; | ||
42 | static size_t cursor = 0; | 46 | static size_t cursor = 0; |
43 | static const char *font = NULL; | 47 | static const char *font = NULL; |
44 | static const char *prompt = NULL; | 48 | static const char *prompt = NULL; |
@@ -46,10 +50,6 @@ static const char *normbgcolor = "#cccccc"; | |||
46 | static const char *normfgcolor = "#000000"; | 50 | static const char *normfgcolor = "#000000"; |
47 | static const char *selbgcolor = "#0066ff"; | 51 | static const char *selbgcolor = "#0066ff"; |
48 | static const char *selfgcolor = "#ffffff"; | 52 | static const char *selfgcolor = "#ffffff"; |
49 | static unsigned int bh, mw, mh; | ||
50 | static unsigned int inputw = 0; | ||
51 | static unsigned int lines = 0; | ||
52 | static unsigned int promptw; | ||
53 | static unsigned long normcol[ColLast]; | 53 | static unsigned long normcol[ColLast]; |
54 | static unsigned long selcol[ColLast]; | 54 | static unsigned long selcol[ColLast]; |
55 | static Atom utf8; | 55 | static 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))) { |