diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-07-05 00:14:28 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-07-05 00:14:28 +0200 |
commit | d82231d0df1d0d16dcb8df6a91bc13877ade0bfe (patch) | |
tree | a4d58729ba2479fd172d986781f7915f5bb85ee1 | |
parent | 727e3dc51a84286885cf0fd406834ac0a1561734 (diff) |
Correctly switch to other RofiViewState.
* Triggers when error message occurs on handling action.
* Reproducable with broken drun file. (give a non-existing path)
-rw-r--r-- | source/view.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/view.c b/source/view.c index 14755500..70d8668e 100644 --- a/source/view.c +++ b/source/view.c @@ -1378,8 +1378,12 @@ void rofi_view_maybe_update ( RofiViewState *state ) if ( rofi_view_get_completed ( state ) ) { // This menu is done. rofi_view_finalize ( state ); - // cleanup - if ( rofi_view_get_active () == NULL ) { + // If there a state. (for example error) reload it. + state = rofi_view_get_active (); + + // cleanup, if no more state to display. + if ( state == NULL ) { + // Quit main-loop. rofi_quit_main_loop (); return; } |