diff options
Diffstat (limited to 'source/keyb.c')
-rw-r--r-- | source/keyb.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source/keyb.c b/source/keyb.c index 57140814..889e3adc 100644 --- a/source/keyb.c +++ b/source/keyb.c @@ -169,13 +169,13 @@ void cleanup_abe ( void ) */ static gboolean _abe_trigger_on_release[NUM_ABE] = { 0 }; -static gboolean abe_test_action ( KeyBindingAction action, unsigned int mask, xkb_keysym_t key ) +static gboolean abe_test_action ( KeyBindingAction action, widget_modifier_mask modmask, xkb_keysym_t key ) { ActionBindingEntry *akb = &( abe[action] ); for ( int iter = 0; iter < akb->num_bindings; iter++ ) { const KeyBinding * const kb = &( akb->kb[iter] ); - if ( ( kb->keysym == key ) && ( kb->modmask == mask ) ) { + if ( ( kb->keysym == key ) && ( kb->modmask == modmask ) ) { if ( kb->release ) { _abe_trigger_on_release[action] = TRUE; } @@ -188,12 +188,12 @@ static gboolean abe_test_action ( KeyBindingAction action, unsigned int mask, xk return FALSE; } -KeyBindingAction abe_find_action ( unsigned int mask, xkb_keysym_t key ) +KeyBindingAction abe_find_action ( widget_modifier_mask modmask, xkb_keysym_t key ) { KeyBindingAction action; for ( action = 0; action < NUM_ABE; ++action ) { - if ( abe_test_action ( action, mask, key ) ) { + if ( abe_test_action ( action, modmask, key ) ) { break; } } @@ -201,6 +201,18 @@ KeyBindingAction abe_find_action ( unsigned int mask, xkb_keysym_t key ) return action; } +void abe_reset_release ( void ) +{ + RofiViewState *state; + + state = rofi_view_get_active ( ); + if ( state ) { + for ( KeyBindingAction action = 0; action < NUM_ABE; ++action ) { + _abe_trigger_on_release[action] = FALSE; + } + } +} + void abe_trigger_release ( void ) { RofiViewState *state; |