Mirate wait update timer to execute in thread 01/292701/7
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 11 May 2023 10:24:45 +0000 (19:24 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 3 Jul 2023 10:05:28 +0000 (19:05 +0900)
Change-Id: I15c58836473fd42f2addd2bbde9336e61abbaa12
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_input_panel.c

index 186bf57..fc7b586 100644 (file)
@@ -94,7 +94,7 @@ struct _E_Input_Panel_Floating_Info
 static E_Input_Panel *g_input_panel = NULL;
 static E_Input_Panel_Floating_Info *g_floating_info = NULL;
 static Eina_Bool panel_show_need_rerun = EINA_FALSE;
-static Ecore_Timer *g_timer_wait_update  = NULL;
+static gint g_timer_wait_update = 0;
 
 static E_Input_Panel_Surface *
 _e_input_panel_surface_get(E_Client *ec)
@@ -290,24 +290,24 @@ _e_input_panel_surface_show(E_Input_Panel_Surface *ips)
 
 static void _wait_update_timer_del()
 {
-   if (g_timer_wait_update)
+   if (g_timer_wait_update > 0)
      {
         LOGI("deleting wait_update timer");
-        ecore_timer_del(g_timer_wait_update);
-        g_timer_wait_update = NULL;
+        g_source_remove(g_timer_wait_update);
+        g_timer_wait_update = 0;
      }
 }
 
-static Eina_Bool
+static gboolean
 _wait_update_timer_handler(void *data)
 {
    LOGE("TIMED OUT while waiting for ready_set");
 
    _e_input_panel_surface_show(NULL);
 
-   g_timer_wait_update = NULL;
+   g_timer_wait_update = 0;
 
-   return ECORE_CALLBACK_CANCEL;
+   return FALSE;
 }
 
 static void
@@ -1388,8 +1388,8 @@ e_input_panel_wait_update_set(Eina_Bool wait_update)
      {
         LOGI("Registering wait_update_timer");
         _wait_update_timer_del();
-        g_timer_wait_update = ecore_timer_add(WAIT_UPDATE_TIMER_INTERVAL,
-                                              _wait_update_timer_handler, NULL);
+        g_timer_wait_update = g_timeout_add(WAIT_UPDATE_TIMER_INTERVAL * 1000,
+                                            _wait_update_timer_handler, NULL);
 
         EINA_LIST_FOREACH(g_input_panel->surfaces, l, ips)
           {