Change using e_comp_get() to e_comp_wl_display_get() 72/320972/1
authorjinbong.lee <jinbong.lee@samsung.com>
Tue, 26 Nov 2024 07:21:01 +0000 (16:21 +0900)
committerjinbong.lee <jinbong.lee@samsung.com>
Tue, 26 Nov 2024 07:21:01 +0000 (16:21 +0900)
  - e_comp_get() is internal API of enlightenment.
  - It cause linking error or crash at ling time.

Change-Id: Ia845a473906a11d9803adf9fc915cebe487c2d1a
Signed-off-by: jinbong.lee <jinbong.lee@samsung.com>
src/e_mod_main_wl.c

index 5f5d3121a08f278866b33efb236d6b5113b19dd5..311bf64f5dab9426e07eca5ff2fb0ec06023bc11 100644 (file)
@@ -1145,6 +1145,7 @@ _e_keyrouter_max_keycode_get(void)
 static E_Keyrouter_Config_Data *
 _e_keyrouter_init(E_Module *m)
 {
+   wl_display* comp_wl_display;
    E_Keyrouter_Config_Data *kconfig = NULL;
    krt = E_NEW(E_Keyrouter, 1);
    Eina_Bool res = EINA_FALSE;
@@ -1167,9 +1168,10 @@ _e_keyrouter_init(E_Module *m)
         return NULL;
      }
 
-   if (!e_comp_get())
+   comp_wl_display = e_comp_wl_display_get();
+   if (!comp_wl_display)
      {
-        KLERR("Failed to initialize keyrouter module ! (e_comp_get() == NULL)");
+        KLERR("Failed to initialize keyrouter module ! (comp_wl_display == NULL)");
         goto err;
      }
 
@@ -1194,7 +1196,7 @@ _e_keyrouter_init(E_Module *m)
      ecore_idle_enterer_add(_e_keyrouter_cb_idler, NULL);
    _e_keyrouter_init_handlers();
 
-   krt->global = wl_global_create(e_comp_wl_display_get(), &tizen_keyrouter_interface, 1, krt, _e_keyrouter_cb_bind);
+   krt->global = wl_global_create(comp_wl_display, &tizen_keyrouter_interface, 1, krt, _e_keyrouter_cb_bind);
    if (!krt->global)
      {
         KLERR("Failed to create global !");