1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-03 04:23:42 -05:00

Small fix.

This commit is contained in:
Dave Davenport 2016-01-27 23:39:52 +01:00
parent afc056ecc5
commit 91780b71db
5 changed files with 19 additions and 15 deletions

View file

@ -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

View file

@ -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 );

View file

@ -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;

View file

@ -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;

View file

@ -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 )