1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

view: Fix multi-character compose sequences

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2016-03-07 18:10:17 +01:00
parent f21195dc14
commit abe44475fc
2 changed files with 4 additions and 4 deletions

View file

@ -23,7 +23,7 @@ typedef enum
/** Create amanaged window. */
MENU_NORMAL_WINDOW = 2,
/** ERROR dialog */
MENU_ERROR_DIALOG = 4,
MENU_ERROR_DIALOG = 4,
} MenuFlags;
/**

View file

@ -307,7 +307,7 @@ unsigned int rofi_view_get_completed ( const RofiViewState *state )
static void rofi_view_resize ( RofiViewState *state )
{
if ( (state->menu_flags&MENU_ERROR_DIALOG) == MENU_ERROR_DIALOG ){
if ( ( state->menu_flags & MENU_ERROR_DIALOG ) == MENU_ERROR_DIALOG ) {
// Resize of error dialog.
int entrybox_width = state->w - ( 2 * ( state->border ) );
textbox_moveresize ( state->text, state->text->widget.x, state->text->widget.y, entrybox_width, state->line_height );
@ -328,7 +328,7 @@ static void rofi_view_resize ( RofiViewState *state )
}
int entrybox_width = state->w - ( 2 * ( state->border ) );
int offset = 0;
int width = textbox_get_width ( state->case_indicator );
int width = textbox_get_width ( state->case_indicator );
entrybox_width -= width + textbox_get_width ( state->prompt_tb );
offset = width;
textbox_moveresize ( state->text, state->text->widget.x, state->text->widget.y, entrybox_width, state->line_height );
@ -1317,7 +1317,7 @@ static void rofi_view_mainloop_iter ( RofiViewState *state, xcb_generic_event_t
case XKB_COMPOSE_NOTHING:
break;
}
if ( key == XKB_KEY_NoSymbol ) {
if ( ( key == XKB_KEY_NoSymbol ) && ( len == 0 ) ) {
break;
}
}