summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-01-27 23:39:52 +0100
committerDave Davenport <qball@gmpclient.org>2016-01-27 23:39:52 +0100
commit91780b71dbcf509afa3f84a0bde4c503c801b27b (patch)
treea7fcec6a208ba0b3511b15b16ff16e90b112e53f /source
parentafc056ecc50bb6f082356605ee6e82121a383d48 (diff)
Small fix.
Diffstat (limited to 'source')
-rw-r--r--source/dialogs/dmenu.c9
-rw-r--r--source/rofi.c3
-rw-r--r--source/textbox.c2
-rw-r--r--source/x11-event-source.c2
4 files changed, 10 insertions, 6 deletions
diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c
index e8c5e498..cb59f853 100644
--- a/source/dialogs/dmenu.c
+++ b/source/dialogs/dmenu.c
@@ -399,14 +399,13 @@ int dmenu_switcher_dialog ( void )
}
MenuState *state = menu ( &dmenu_mode, input, pd->prompt, pd->message, menu_flags );
- while ( XPending (display) ){
+ menu_state_set_selected_line ( state, pd->selected_line );
+ while ( XPending ( display ) ) {
XEvent ev;
XNextEvent ( display, &ev );
menu_state_itterrate ( state, &ev );
}
do {
- menu_state_restart ( state );
- menu_state_set_selected_line ( state, pd->selected_line );
retv = FALSE;
menu_state_set_active ( state );
@@ -495,6 +494,10 @@ int dmenu_switcher_dialog ( void )
restart = FALSE;
retv = 10 + ( mretv & MENU_LOWER_MASK );
}
+ if ( restart ) {
+ menu_state_restart ( state );
+ menu_state_set_selected_line ( state, pd->selected_line );
+ }
} while ( restart );
menu_state_free ( state );
diff --git a/source/rofi.c b/source/rofi.c
index a184e924..9981a6c6 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -1600,7 +1600,8 @@ MenuState *menu ( Mode *sw,
state->top_offset = state->border * 1 + state->line_height + 2 + config.line_margin * 2;
// Move indicator to end.
- widget_move ( WIDGET ( state->case_indicator ), state->border + textbox_get_width ( state->prompt_tb ) + entrybox_width, state->border );
+ widget_move ( WIDGET ( state->case_indicator ), state->border + textbox_get_width ( state->prompt_tb ) + entrybox_width,
+ state->border );
textbox_text ( state->case_indicator, get_matching_state () );
state->message_tb = NULL;
diff --git a/source/textbox.c b/source/textbox.c
index 0c461550..fa5db216 100644
--- a/source/textbox.c
+++ b/source/textbox.c
@@ -103,7 +103,7 @@ textbox* textbox_create ( TextboxFlags flags, short x, short y, short w, short h
tb->blink_timeout = 0;
tb->blink = 1;
if ( ( flags & TB_EDITABLE ) == TB_EDITABLE ) {
- tb->blink_timeout = g_timeout_add ( 1200, textbox_blink, tb );
+ // tb->blink_timeout = g_timeout_add ( 1200, textbox_blink, tb );
}
return tb;
diff --git a/source/x11-event-source.c b/source/x11-event-source.c
index b03819ce..f12f883d 100644
--- a/source/x11-event-source.c
+++ b/source/x11-event-source.c
@@ -18,7 +18,7 @@ static gboolean x11_event_source_prepare ( GSource * base, gint * timeout )
{
X11EventSource *xs = (X11EventSource *) base;
*timeout = -1;
- return /*XPending ( xs->display ) || */g_source_query_unix_fd ( base, xs->fd_x11 );
+ return /*XPending ( xs->display ) || */ g_source_query_unix_fd ( base, xs->fd_x11 );
}
static gboolean x11_event_source_check ( GSource * base )