From: Duna Oh Date: Wed, 15 Jun 2016 02:08:58 +0000 (+0900) Subject: e_comp_wl: add API to enable/disable cursor timer X-Git-Tag: submit/tizen/20160616.140123~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d027b324dbecddd8f0954dba9aaf297124b9ce8;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl: add API to enable/disable cursor timer Signed-off-by: Duna Oh Change-Id: Ia5723eb19cde53855127a4ac4ef4be8cdd1f2ae4 --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 5378f16901..9a9ae51ff2 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -5412,3 +5412,21 @@ e_comp_wl_shell_surface_ready(E_Client *ec) _e_comp_wl_hook_call(E_COMP_WL_HOOK_SHELL_SURFACE_READY, ec); } + +E_API void +e_comp_wl_input_cursor_timer_enable_set(Eina_Bool enabled) +{ + e_config->use_cursor_timer = !!enabled; + + if (e_config->use_cursor_timer == EINA_FALSE && e_pointer_is_hidden(e_comp->pointer)) + { + _e_comp_wl_cursor_reload(e_client_focused_get()); + } + else if (e_config->use_cursor_timer == EINA_FALSE && !e_pointer_is_hidden(e_comp->pointer)) + { + if(e_comp_wl->ptr.hide_tmr) + ecore_timer_del(e_comp_wl->ptr.hide_tmr); + e_comp_wl->ptr.hide_tmr = NULL; + cursor_timer_ec = NULL; + } +} diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 400d33ca31..dcd9c541c1 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -509,6 +509,8 @@ E_API void e_comp_wl_map_size_cal_from_buffer(E_Client *ec); E_API void e_comp_wl_map_size_cal_from_viewport(E_Client *ec); E_API void e_comp_wl_map_apply(E_Client *ec); +E_API void e_comp_wl_input_cursor_timer_enable_set(Eina_Bool enabled); + E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD; # endif