mirror of https://github.com/davatorium/rofi.git
Issue: #39 remove delay (until next blink) when triggering on release
This commit is contained in:
parent
2220b75467
commit
c9b5667a3f
|
@ -194,16 +194,14 @@ KeyBindingAction abe_find_action ( unsigned int mask, xkb_keysym_t key )
|
||||||
void abe_trigger_release ( void )
|
void abe_trigger_release ( void )
|
||||||
{
|
{
|
||||||
RofiViewState *state;
|
RofiViewState *state;
|
||||||
KeyBindingAction action;
|
|
||||||
|
|
||||||
state = rofi_view_get_active ( );
|
state = rofi_view_get_active ( );
|
||||||
if ( state ) {
|
if ( state ) {
|
||||||
for ( action = 0; action < NUM_ABE; ++action ) {
|
for ( KeyBindingAction action = 0; action < NUM_ABE; ++action ) {
|
||||||
if ( _abe_trigger_on_release[action] ) {
|
if ( _abe_trigger_on_release[action] ) {
|
||||||
rofi_view_trigger_action ( state, action );
|
rofi_view_trigger_action ( state, action );
|
||||||
_abe_trigger_on_release[action] = FALSE;
|
_abe_trigger_on_release[action] = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rofi_view_update ( state );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -510,6 +510,18 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN
|
||||||
modmask = x11_get_current_mask ( &xkb );
|
modmask = x11_get_current_mask ( &xkb );
|
||||||
if ( modmask == 0 ) {
|
if ( modmask == 0 ) {
|
||||||
abe_trigger_release ( );
|
abe_trigger_release ( );
|
||||||
|
// Because of abe_trigger, state of rofi can be changed. handle this!
|
||||||
|
RofiViewState *state = rofi_view_get_active ();
|
||||||
|
if ( state != NULL ) {
|
||||||
|
if ( rofi_view_get_completed ( state ) ) {
|
||||||
|
// This menu is done.
|
||||||
|
rofi_view_finalize ( state );
|
||||||
|
// cleanup
|
||||||
|
if ( rofi_view_get_active () == NULL ) {
|
||||||
|
g_main_loop_quit ( main_loop );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue