diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-02-21 13:10:32 +0100 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-02-21 16:04:53 +0100 |
commit | e1f87a67b4352ad60b4fc0291a121515fe7f15d3 (patch) | |
tree | 75306214dba8f20590c2a8f8a8bb17400c21750d /source/textbox.c | |
parent | fe7ca2079d97172980f0bc725f532019fc9b7eb5 (diff) |
rofi: Migrate to libxkbcommon
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/textbox.c')
-rw-r--r-- | source/textbox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/textbox.c b/source/textbox.c index bb784eb8..d9225fb3 100644 --- a/source/textbox.c +++ b/source/textbox.c @@ -533,14 +533,14 @@ static void textbox_cursor_del_word ( textbox *tb ) // 0 = unhandled // 1 = handled // -1 = handled and return pressed (finished) -int textbox_keypress ( textbox *tb, xcb_key_press_event_t *ev, char *pad, int pad_len, KeySym key, Status stat ) +int textbox_keypress ( textbox *tb, xcb_key_press_event_t *ev, char *pad, int pad_len, xkb_keysym_t key ) { if ( !( tb->flags & TB_EDITABLE ) ) { return 0; } int old_blink = tb->blink; tb->blink = 2; - if ( stat == XLookupKeySym || stat == XLookupBoth ) { + if ( key != XKB_KEY_NoSymbol ) { // Left or Ctrl-b if ( abe_test_action ( MOVE_CHAR_BACK, ev->state, key ) ) { textbox_cursor_dec ( tb ); @@ -606,7 +606,7 @@ int textbox_keypress ( textbox *tb, xcb_key_press_event_t *ev, char *pad, int pa return -1; } } - if ( pad_len > 0 && ( stat == XLookupBoth || stat == XLookupChars ) ) { + if ( pad_len > 0 ) { // Filter When alt/ctrl is pressed do not accept the character. if ( !g_ascii_iscntrl ( *pad ) ) { textbox_insert ( tb, tb->cursor, pad, pad_len ); |