discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=79345485dd8b58992561a8caf5976732f605b714

commit 79345485dd8b58992561a8caf5976732f605b714
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Aug 17 14:30:34 2015 -0400

    simplify ibar focus function
---
 src/modules/ibar/e_mod_main.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index dd3f126..9f2f8dd 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -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

-- 


Reply via email to