simplify ibar focus function

This commit is contained in:
Mike Blumenkrantz 2015-08-17 14:30:34 -04:00
parent e9de478b03
commit 79345485dd
1 changed files with 4 additions and 14 deletions

View File

@ -2526,23 +2526,13 @@ _ibar_go_focus(void)
IBar *b;
if (_ibar_focus_win) return;
b = _ibar_manager_find();
if (!b) return;
if (!e_comp_grab_input(0, 1)) return;
_ibar_focus_win = e_comp->ee_win;
_ibar_key_down_handler = ecore_event_handler_add
(ECORE_EVENT_KEY_DOWN, _ibar_focus_cb_key_down, NULL);
if (!_ibar_key_down_handler) goto err;
b = _ibar_manager_find();
if (!b) goto err;
_ibar_key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
_ibar_focus_cb_key_down, NULL);
_ibar_focus(b);
return;
err:
if (_ibar_key_down_handler) ecore_event_handler_del(_ibar_key_down_handler);
_ibar_key_down_handler = NULL;
if (_ibar_focus_win)
{
e_comp_ungrab_input(0, 1);
}
_ibar_focus_win = 0;
}
static void