From 3b58c3a26a8ceec67620198e629d381fb1e0e6c8 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 23 Feb 2016 21:14:15 +0100 Subject: [PATCH] Fix issue: #347. --- include/textbox.h | 18 +++++++++--------- source/dialogs/window.c | 1 + source/rofi.c | 10 +++++----- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/include/textbox.h b/include/textbox.h index 757b1c62..c321eb47 100644 --- a/include/textbox.h +++ b/include/textbox.h @@ -42,15 +42,15 @@ typedef struct typedef enum { - TB_AUTOHEIGHT = 1 << 0, - TB_AUTOWIDTH = 1 << 1, - TB_LEFT = 1 << 16, - TB_RIGHT = 1 << 17, - TB_CENTER = 1 << 18, - TB_EDITABLE = 1 << 19, - TB_MARKUP = 1 << 20, - TB_WRAP = 1 << 21, - TB_PASSWORD = 1 << 22, + TB_AUTOHEIGHT = 1 << 0, + TB_AUTOWIDTH = 1 << 1, + TB_LEFT = 1 << 16, + TB_RIGHT = 1 << 17, + TB_CENTER = 1 << 18, + TB_EDITABLE = 1 << 19, + TB_MARKUP = 1 << 20, + TB_WRAP = 1 << 21, + TB_PASSWORD = 1 << 22, } TextboxFlags; typedef enum diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 01da9e49..fb1d4e2a 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -537,6 +537,7 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i window_send_message ( display, root, rmpd->ids->array[selected_line], netatoms[_NET_ACTIVE_WINDOW], 2, // 2 = pager SubstructureNotifyMask | SubstructureRedirectMask, 0 ); + XFlush ( display ); } } return retv; diff --git a/source/rofi.c b/source/rofi.c index 7f1ce608..9fe01f3d 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -252,9 +252,6 @@ void process_result ( RofiViewState *state ) } // Cleanup g_free ( input ); - for ( unsigned int i = 0; i < num_modi; i++ ) { - mode_destroy ( modi[i] ); - } } } void process_result_error ( RofiViewState *state ) @@ -356,6 +353,9 @@ static int grab_global_keybindings () */ static void cleanup () { + for ( unsigned int i = 0; i < num_modi; i++ ) { + mode_destroy ( modi[i] ); + } rofi_view_workers_finalize (); if ( main_loop != NULL ) { if ( main_loop_source ) { @@ -664,9 +664,9 @@ static gboolean startup ( G_GNUC_UNUSED gpointer data ) config.sidebar_mode = FALSE; int retv = run_dmenu (); if ( retv ) { - rofi_set_return_code ( EXIT_SUCCESS ); + rofi_set_return_code ( EXIT_SUCCESS ); // Directly exit. - g_main_loop_quit(main_loop); + g_main_loop_quit ( main_loop ); } } else if ( find_arg_str ( "-e", &( msg ) ) ) {