e_comp_wl: add API to enable/disable cursor timer 13/74613/2
authorDuna Oh <duna.oh@samsung.com>
Wed, 15 Jun 2016 02:08:58 +0000 (11:08 +0900)
committerDuna Oh <duna.oh@samsung.com>
Wed, 15 Jun 2016 06:33:55 +0000 (15:33 +0900)
Signed-off-by: Duna Oh <duna.oh@samsung.com>
Change-Id: Ia5723eb19cde53855127a4ac4ef4be8cdd1f2ae4

src/bin/e_comp_wl.c
src/bin/e_comp_wl.h

index 5378f169019a165fe9e642b9abd101cc7f60cd06..9a9ae51ff20cedf753b52d84c3e1e3c2533f5f88 100644 (file)
@@ -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;
+     }
+}
index 400d33ca3174a2d6a68dd5c4adeb4a1f3fa6bea8..dcd9c541c176e1996bcf2877b37e537381b0452e 100644 (file)
@@ -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