diff options
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -96,15 +96,6 @@ calcoffsets(void) break; } -static int -max_textw(void) -{ - int len = 0; - for (struct item *item = items; item && item->text; item++) - len = MAX(TEXTW(item->text), len); - return len; -} - static void cleanup(void) { @@ -677,7 +668,7 @@ setup(void) break; if (centered) { - mw = MIN(MAX(max_textw() + promptw, min_width), info[i].width); + mw = centered_width; x = info[i].x_org + ((info[i].width - mw) / 2); y = info[i].y_org + ((info[i].height - mh) / 2); } else { @@ -695,7 +686,7 @@ setup(void) parentwin); if (centered) { - mw = MIN(MAX(max_textw() + promptw, min_width), wa.width); + mw = centered_width; x = (wa.width - mw) / 2; y = (wa.height - mh) / 2; } else { |