From 9eb59fb61692b92ba87cc01083a6934594b0139e Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 10 Nov 2014 09:29:20 +0100 Subject: [PATCH] [FullHeight] Fix height calculation * Take window border into account. --- source/rofi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index b81e34f8..f19583a9 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -1555,16 +1555,14 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom monitor_active ( &mon ); if ( config.menu_lines == 0 ) { // Autosize it. - int h = mon.h - config.padding * 2 - LINE_MARGIN; + int h = mon.h - config.padding * 2 - LINE_MARGIN - config.menu_bw * 2; int r = ( h ) / ( line_height * config.element_height ) - 1 - config.sidebar_mode; - // HACK todo fix this. state.menu_lines = r; - menu_calculate_rows_columns ( &state ); } else { state.menu_lines = config.menu_lines; - menu_calculate_rows_columns ( &state ); } + menu_calculate_rows_columns ( &state );