e_comp_wl: check if cursor timer is not NULL when gets mouse_in 41/92541/7
authorDuna Oh <duna.oh@samsung.com>
Mon, 17 Oct 2016 09:02:08 +0000 (18:02 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 2 Nov 2016 02:13:37 +0000 (19:13 -0700)
When gets mouse_out, we calls e_pointer_object_set() for resetting cursor.
It hides cursor, not by cursor hide timer.
We gets mouse_in after mouse_out. We need to check cursor timer and send wl_pointer.enter event.

Change-Id: Ia9102a60517f23e6b46fe623374bb2669552b18d
Signed-off-by: Duna Oh <duna.oh@samsung.com>
src/bin/e_comp_wl.c

index f606c9d..945f2e6 100755 (executable)
@@ -994,12 +994,17 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj
 
    if (e_config->use_cursor_timer)
      {
-        if (e_pointer_is_hidden(e_comp->pointer))
-          return;
         if (e_comp_wl->ptr.hide_tmr)
-          ecore_timer_del(e_comp_wl->ptr.hide_tmr);
-        cursor_timer_ec = ec;
-        e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
+          {
+             ecore_timer_del(e_comp_wl->ptr.hide_tmr);
+             cursor_timer_ec = ec;
+             e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
+          }
+        else
+          {
+             if (e_pointer_is_hidden(e_comp->pointer))
+               return;
+          }
      }
 
    if (!eina_list_count(e_comp_wl->ptr.resources)) return;
@@ -1062,15 +1067,10 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
         return;
      }
 
-   if (e_config->use_cursor_timer)
+   if (e_config->use_cursor_timer && !e_comp_wl->ptr.hide_tmr)
      {
         if (e_pointer_is_hidden(e_comp->pointer))
           return;
-        if (cursor_timer_ec == ec)
-          {
-             E_FREE_FUNC(e_comp_wl->ptr.hide_tmr, ecore_timer_del);
-             cursor_timer_ec = NULL;
-          }
      }
 
    if (!eina_list_count(e_comp_wl->ptr.resources)) return;