Always set size, to work better in floating window manager in normal window mode

This commit is contained in:
Dave Davenport 2017-02-01 21:17:45 +01:00
parent f10b879cac
commit 1ee67e8bba
1 changed files with 7 additions and 10 deletions

View File

@ -1084,16 +1084,13 @@ static void rofi_view_refilter ( RofiViewState *state )
state->retv = MENU_OK; state->retv = MENU_OK;
state->quit = TRUE; state->quit = TRUE;
} }
// Size the window.
// Make sure we enable fixed num lines when in normal window mode. int height = rofi_view_calculate_height ( state );
if ( ( CacheState.flags & MENU_NORMAL_WINDOW ) == 0 ) { if ( height != state->height ) {
int height = rofi_view_calculate_height ( state ); state->height = height;
if ( height != state->height ) { rofi_view_calculate_window_position ( state );
state->height = height; rofi_view_window_update_size ( state );
rofi_view_calculate_window_position ( state ); g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Resize based on re-filter" );
rofi_view_window_update_size ( state );
g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Resize based on re-filter" );
}
} }
state->refilter = FALSE; state->refilter = FALSE;
TICK_N ( "Filter done" ); TICK_N ( "Filter done" );