mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Fix crasher in error message. update reference output.
This commit is contained in:
parent
47aa7c4900
commit
df74540624
3 changed files with 8 additions and 4 deletions
|
@ -134,6 +134,8 @@ Global options:
|
|||
True (Default)
|
||||
-[no-]show-match Indicate how it match by underlining it.
|
||||
True (Default)
|
||||
-theme [string] New style theme file
|
||||
(unset) (Default)
|
||||
-pid [string] Pidfile location
|
||||
/tmp/rofi.pid (File)
|
||||
-kb-primary-paste [string] Paste primary selection
|
||||
|
|
|
@ -98,6 +98,8 @@ rofi.window-format: w c t
|
|||
! rofi.click-to-exit: true
|
||||
! "Indicate how it match by underlining it." Set from: Default
|
||||
! rofi.show-match: true
|
||||
! "New style theme file" Set from: Default
|
||||
! rofi.theme:
|
||||
! "Pidfile location" Set from: File
|
||||
rofi.pid: /tmp/rofi.pid
|
||||
! "Paste primary selection" Set from: File
|
||||
|
|
|
@ -657,7 +657,7 @@ void __create_window ( MenuFlags menu_flags )
|
|||
*
|
||||
* Calculate the width of the window and the width of an element.
|
||||
*/
|
||||
static void rofi_view_calculate_window_and_element_width ( RofiViewState *state )
|
||||
static void rofi_view_calculate_window_width ( RofiViewState *state )
|
||||
{
|
||||
if ( config.fullscreen ) {
|
||||
state->width = CacheState.mon.w;
|
||||
|
@ -1437,8 +1437,6 @@ RofiViewState *rofi_view_create ( Mode *sw,
|
|||
state->main_box = box_create ( "mainbox.box", BOX_VERTICAL );
|
||||
window_add ( state->main_window, WIDGET ( state->main_box ) );
|
||||
|
||||
// we need this at this point so we can get height.
|
||||
rofi_view_calculate_window_and_element_width ( state );
|
||||
|
||||
state->input_bar = box_create ( "inputbar.box", BOX_HORIZONTAL );
|
||||
state->input_bar_separator = separator_create ( "inputbar.separator", S_HORIZONTAL, 2 );
|
||||
|
@ -1516,6 +1514,8 @@ RofiViewState *rofi_view_create ( Mode *sw,
|
|||
if ( (CacheState.flags&MENU_NORMAL_WINDOW) == MENU_NORMAL_WINDOW){
|
||||
config.fixed_num_lines = TRUE;
|
||||
}
|
||||
|
||||
rofi_view_calculate_window_width ( state );
|
||||
state->height = rofi_view_calculate_height ( state );
|
||||
|
||||
// Move the window to the correct x,y position.
|
||||
|
@ -1545,7 +1545,6 @@ int rofi_view_error_dialog ( const char *msg, int markup )
|
|||
state->menu_flags = MENU_ERROR_DIALOG;
|
||||
state->finalize = process_result;
|
||||
|
||||
rofi_view_calculate_window_and_element_width ( state );
|
||||
state->main_window = window_create ( "window" );
|
||||
state->main_box = box_create ( "mainbox.box", BOX_VERTICAL);
|
||||
window_add ( state->main_window, WIDGET ( state->main_box ) );
|
||||
|
@ -1561,6 +1560,7 @@ int rofi_view_error_dialog ( const char *msg, int markup )
|
|||
// resize window vertically to suit
|
||||
state->height = line_height + window_get_border_width ( state->main_window)+widget_padding_get_padding_height ( WIDGET(state->main_window) );
|
||||
|
||||
rofi_view_calculate_window_width ( state );
|
||||
// Calculte window position.
|
||||
rofi_view_calculate_window_position ( state );
|
||||
|
||||
|
|
Loading…
Reference in a new issue