elm_atspi: Return package name as application name 49/278949/2
authorLukasz Oleksak <l.oleksak@samsung.com>
Thu, 28 Jul 2022 14:29:57 +0000 (16:29 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Thu, 28 Jul 2022 15:20:25 +0000 (17:20 +0200)
This patch unifies the behavior with DALi.

@tizen_only

Change-Id: I7a3eb090914e99efe90ffcf30e1c9e0a9fe5ed96

packaging/efl.spec
src/lib/elementary/elm_atspi_app_object.c
src/lib/elementary/meson.build

index d5c00a2..43af964 100644 (file)
@@ -29,6 +29,7 @@ BuildRequires:  pkgconfig(libinput)
 BuildRequires:  pkgconfig(zlib)
 BuildRequires:  gettext-tools
 BuildRequires:  hyphen-devel
+BuildRequires:  pkgconfig(aul)
 
 BuildRequires:  meson >= 0.49.0
 
index b06a112..3da5b7e 100644 (file)
@@ -6,6 +6,10 @@
 
 #include "elm_priv.h"
 
+//TIZEN_ONLY(20220728): Return package name as application name
+#include <aul.h>
+//
+
 extern Eina_List *_elm_win_list;
 
 typedef struct _Elm_Atspi_App_Object_Data Elm_Atspi_App_Object_Data;
@@ -57,9 +61,26 @@ _elm_atspi_app_object_efl_access_object_access_children_get(const Eo *obj EINA_U
 EOLIAN static const char*
 _elm_atspi_app_object_efl_access_object_i18n_name_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED)
 {
-   const char *ret;
-   ret = elm_app_name_get();
-   return ret;
+  //TIZEN_ONLY(20220728): Return package name as application name
+  //const char *ret;
+  //ret = elm_app_name_get();
+  //return ret;
+  static char buffer[4096];
+  static const char *app_name;
+
+  if (!app_name)
+    {
+       int ret;
+       ret = aul_app_get_pkgname_bypid(getpid(), buffer, sizeof(buffer));
+
+       if (ret == AUL_R_OK)
+         app_name = buffer;
+       else
+         app_name = elm_app_name_get();
+    }
+
+  return app_name;
+  //
 }
 
 EOLIAN static const char*
index 9973d28..80ae571 100644 (file)
@@ -1058,7 +1058,7 @@ elementary_src_tizen = elementary_src_tizen_tmp
 elementary_deps = [emile, eo, efl, edje, ethumb, ethumb_client, emotion, ecore_imf, ecore_con, eldbus, efreet, eio, buildsystem]
 elementary_pub_deps = [eina, eet, evas, ecore, ecore_evas, ecore_file, ecore_input, ecore_imf, ecore_con,
                        edje, eldbus, efreet, ethumb_client, efl]
-elementary_ext_deps = [atspi, dl, intl, buildsystem_simple]
+elementary_ext_deps = [atspi, dependency('aul'), dl, intl, buildsystem_simple]
 elm_options = configuration_data()
 
 config_h.set_quoted('ELM_TOP_BUILD_DIR', meson.build_root())