discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=5e5a533a6d1266168ca74ea9a551e86d16191e4d

commit 5e5a533a6d1266168ca74ea9a551e86d16191e4d
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Jan 22 15:29:23 2015 -0500

    move grabinput focus fix timer to be X-only
---
 src/bin/e_grabinput.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/bin/e_grabinput.c b/src/bin/e_grabinput.c
index 8c3ee56..449dcd6 100644
--- a/src/bin/e_grabinput.c
+++ b/src/bin/e_grabinput.c
@@ -1,7 +1,6 @@
 #include "e.h"
 
 /* local subsystem functions */
-static Eina_Bool _e_grabinput_focus_check(void *data);
 static void      _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method 
method);
 static void      _e_grabinput_focus(Ecore_Window win, E_Focus_Method method);
 
@@ -13,7 +12,9 @@ static E_Focus_Method focus_method = E_FOCUS_METHOD_NO_INPUT;
 static double last_focus_time = 0.0;
 
 static Ecore_Window focus_fix_win = 0;
+#ifndef HAVE_WAYLAND_ONLY
 static Ecore_Timer *focus_fix_timer = NULL;
+#endif
 static E_Focus_Method focus_fix_method = E_FOCUS_METHOD_NO_INPUT;
 
 /* externally accessible functions */
@@ -26,11 +27,9 @@ e_grabinput_init(void)
 EINTERN int
 e_grabinput_shutdown(void)
 {
-   if (focus_fix_timer)
-     {
-        ecore_timer_del(focus_fix_timer);
-        focus_fix_timer = NULL;
-     }
+#ifndef HAVE_WAYLAND_ONLY
+   E_FREE_FUNC(focus_fix_timer, ecore_timer_del);
+#endif
    return 1;
 }
 
@@ -152,19 +151,19 @@ e_grabinput_key_win_get(void)
    return grab_key_win;
 }
 
+#ifndef HAVE_WAYLAND_ONLY
 static Eina_Bool
 _e_grabinput_focus_check(void *data __UNUSED__)
 {
-#ifndef HAVE_WAYLAND_ONLY
    if (ecore_x_window_focus_get() != focus_fix_win)
      {
         /* fprintf(stderr, "foc do 2\n"); */
         _e_grabinput_focus_do(focus_fix_win, focus_fix_method);
      }
-#endif
    focus_fix_timer = NULL;
    return EINA_FALSE;
 }
+#endif
 
 static void
 _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
@@ -210,7 +209,10 @@ _e_grabinput_focus(Ecore_Window win, E_Focus_Method method)
    /* fprintf(stderr, "foc do 1\n"); */
    _e_grabinput_focus_do(win, method);
    last_focus_time = ecore_loop_time_get();
+#ifndef HAVE_WAYLAND_ONLY
+   if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
    if (focus_fix_timer) ecore_timer_del(focus_fix_timer);
    focus_fix_timer = ecore_timer_add(0.2, _e_grabinput_focus_check, NULL);
+#endif
 }
 

-- 


Reply via email to