summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2016-11-14 11:47:49 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2016-11-15 10:38:24 +0900
commit6b384d023e533b8bd89ce81cd5844bf50d1a1cac (patch)
tree178cc73b25ad327719411a8bc1123d485d3f8a3f
parentfa3ec686bf8cbb43cb8087442cae1449caa3694c (diff)
downloadappcore-widget-6b384d023e533b8bd89ce81cd5844bf50d1a1cac.tar.gz
appcore-widget-6b384d023e533b8bd89ce81cd5844bf50d1a1cac.tar.bz2
appcore-widget-6b384d023e533b8bd89ce81cd5844bf50d1a1cac.zip
Change-Id: I2db8f30ae410aba654b3559e19f510f938ed023f
-rwxr-xr-xsrc/widget_app.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/widget_app.c b/src/widget_app.c
index 80d9cb8..374e437 100755
--- a/src/widget_app.c
+++ b/src/widget_app.c
@@ -1346,6 +1346,14 @@ EXPORT_API const char *widget_app_get_id(widget_context_h context)
return context->id;
}
+static void _win_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ /* Remove data used in accessibility */
+ char *plug_id;
+ plug_id = evas_object_data_del(obj, "___PLUGID");
+ free(plug_id);
+}
+
EXPORT_API int widget_app_get_elm_win(widget_context_h context,
Evas_Object **win)
{
@@ -1353,6 +1361,7 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context,
Evas_Object *ret_win;
Ecore_Wl_Window *wl_win;
struct wl_surface *surface;
+ char buffer[256];
if (!_is_widget_feature_enabled()) {
_E("not supported"); /* LCOV_EXCL_LINE */
@@ -1390,6 +1399,11 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context,
cxt->win = ret_win;
cxt->win_id = ecore_wl_window_id_get(wl_win);
+ /* Set data to use in accessibility */
+ snprintf(buffer, sizeof(buffer), "%s:%d", cxt->id, getpid());
+ evas_object_data_set(ret_win, "___PLUGID", strdup(buffer));
+ evas_object_event_callback_add(ret_win, EVAS_CALLBACK_DEL, _win_del_cb, NULL);
+
_D("window created: %d", cxt->win_id);
return WIDGET_ERROR_NONE;