replace pepper-based backend to tbm-based 11/91611/6 accepted/tizen/3.0/common/20161114.082442 accepted/tizen/3.0/ivi/20161104.104719 accepted/tizen/3.0/mobile/20161104.104619 accepted/tizen/3.0/tv/20161104.104642 accepted/tizen/3.0/wearable/20161104.104656 accepted/tizen/common/20161104.055906 accepted/tizen/ivi/20161103.232000 accepted/tizen/mobile/20161103.231901 accepted/tizen/tv/20161103.231919 accepted/tizen/wearable/20161103.231935 submit/tizen/20161103.092503 submit/tizen_3.0/20161103.094516 submit/tizen_3.0/20161104.073859 submit/tizen_3.0/20161104.085937 submit/tizen_3.0_common/20161110.084657
authorDaehyeon Jung <darrenh.jung@samsung.com>
Mon, 10 Oct 2016 10:36:17 +0000 (19:36 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Thu, 3 Nov 2016 10:12:17 +0000 (19:12 +0900)
Change-Id: I36817241c9797b8cdc924b9507a3cf51a491d226
Signed-off-by: Daehyeon Jung <darrenh.jung@samsung.com>
CMakeLists.txt
packaging/appcore-widget.spec
src/widget_app.c

index 8e4023a..e2669a7 100644 (file)
@@ -42,6 +42,8 @@ pkg_check_modules(pkg_widget REQUIRED
                vconf-internal-keys
                widget_service
                capi-system-info
+               ecore-wayland
+               tizen-remote-surface-client
                )
 FOREACH(flag ${pkg_widget_CFLAGS})
        SET(EXTRA_CFLAGS_widget "${EXTRA_CFLAGS_widget} ${flag}")
@@ -51,7 +53,7 @@ ADD_LIBRARY(${APPCORE_WIDGET} SHARED ${SRCS_widget})
 SET_TARGET_PROPERTIES(${APPCORE_WIDGET} PROPERTIES SOVERSION ${VERSION_MAJOR})
 SET_TARGET_PROPERTIES(${APPCORE_WIDGET} PROPERTIES VERSION ${VERSION})
 SET_TARGET_PROPERTIES(${APPCORE_WIDGET} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_widget})
-TARGET_LINK_LIBRARIES(${APPCORE_WIDGET} ${pkg_widget_LDFLAGS} "-ldl")
+TARGET_LINK_LIBRARIES(${APPCORE_WIDGET} ${pkg_widget_LDFLAGS} "-ldl -Wl,--no-undefined")
 
 INSTALL(TARGETS ${APPCORE_WIDGET} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPCORE_WIDGET}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
index 71da10d..5355ca0 100644 (file)
@@ -17,6 +17,8 @@ BuildRequires:  pkgconfig(appcore-common)
 BuildRequires:  pkgconfig(capi-appfw-app-common)
 BuildRequires:  pkgconfig(widget_service)
 BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(wayland-tbm-client)
+BuildRequires: pkgconfig(ecore-wayland)
 BuildRequires:  cmake
 
 
index 243908a..80d9cb8 100755 (executable)
@@ -36,6 +36,7 @@
 #include <system_info.h>
 #include <vconf.h>
 #include <vconf-internal-keys.h>
+#include <aul_rsm_provider.h>
 
 #include "widget_app.h"
 #include "widget-log.h"
@@ -867,8 +868,6 @@ static int __before_loop(int argc, char **argv)
 {
        int r;
        bundle *kb = NULL;
-       char *wayland_display = NULL;
-       char *xdg_runtime_dir = NULL;
        char *name;
        char *viewer_endpoint = NULL;
 
@@ -878,8 +877,6 @@ static int __before_loop(int argc, char **argv)
 
        kb = bundle_import_from_argv(argc, argv);
        if (kb) {
-               bundle_get_str(kb, AUL_K_WAYLAND_WORKING_DIR, &xdg_runtime_dir);
-               bundle_get_str(kb, AUL_K_WAYLAND_DISPLAY, &wayland_display);
                bundle_get_str(kb, WIDGET_K_ENDPOINT, &viewer_endpoint);
                if (viewer_endpoint) {
                        _E("viewer endpoint :%s", viewer_endpoint);
@@ -888,22 +885,14 @@ static int __before_loop(int argc, char **argv)
                        _E("endpoint is missing");
                }
 
-               if (xdg_runtime_dir)
-                       setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 1);
-
-               _D("xdg_runtime_dir:%s", xdg_runtime_dir);
-
-               if (wayland_display)
-                       setenv("WAYLAND_DISPLAY", wayland_display, 1);
-
-               _D("wayland_display:%s", wayland_display);
-
                bundle_free(kb);
                kb = NULL;
        } else {
                _E("failed to get launch argv"); /* LCOV_EXCL_LINE */
        }
 
+       aul_rsm_provider_init();
+
        elm_init(argc, argv);
 
        r = aul_launch_init(__aul_handler, NULL);
@@ -974,6 +963,8 @@ static void __after_loop()
        if (app_ops->terminate)
                app_ops->terminate(app_user_data);
 
+       aul_rsm_provider_fini();
+
        _widget_app_free_viewer_endpoint();
        _widget_core_unset_appcore_event_cb();
        __free_handler_list();
@@ -1155,7 +1146,6 @@ EXPORT_API int widget_app_main(int argc, char **argv,
                                __FUNCTION__,
                                "widget_app_create_cb() callback must be "
                                "registered");
-
        app_ops = callback;
        app_user_data = user_data;
        r = __before_loop(argc, argv);
@@ -1362,6 +1352,7 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context,
        widget_context_s *cxt = (widget_context_s *)context;
        Evas_Object *ret_win;
        Ecore_Wl_Window *wl_win;
+       struct wl_surface *surface;
 
        if (!_is_widget_feature_enabled()) {
                _E("not supported"); /* LCOV_EXCL_LINE */
@@ -1375,17 +1366,25 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context,
        ret_win = elm_win_add(NULL, cxt->id, ELM_WIN_BASIC);
        if (ret_win == NULL) {
                _E("failed to create window"); /* LCOV_EXCL_LINE */
-               return WIDGET_ERROR_FAULT; /* LCOV_EXCL_LINE */
+               goto fault; /* LCOV_EXCL_LINE */
        }
 
        wl_win = elm_win_wl_window_get(ret_win);
        if (wl_win == NULL) {
                _E("failed to get wayland window"); /* LCOV_EXCL_LINE */
-               evas_object_del(ret_win); /* LCOV_EXCL_LINE */
-               return WIDGET_ERROR_FAULT; /* LCOV_EXCL_LINE */
+               goto fault;
        }
 
+       surface = ecore_wl_window_surface_get(wl_win);
+       if (surface == NULL) {
+               _E("failed to get surface"); /* LCOV_EXCL_LINE */
+               goto fault; /* LCOV_EXCL_LINE */
+       }
+
+       aul_rsm_provider_remote_enable(cxt->id, surface);
+
        ecore_wl_window_class_name_set(wl_win, cxt->id);
+       elm_win_aux_hint_add(ret_win, "wm.policy.win.user.geometry", "1");
 
        *win = ret_win;
        cxt->win = ret_win;
@@ -1394,6 +1393,13 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context,
        _D("window created: %d", cxt->win_id);
 
        return WIDGET_ERROR_NONE;
+
+fault:
+       if (ret_win)    /* LCOV_EXCL_LINE */
+               evas_object_del(ret_win); /* LCOV_EXCL_LINE */
+
+       return WIDGET_ERROR_FAULT; /* LCOV_EXCL_LINE */
+
 }
 
 widget_class_h _widget_class_create(widget_class_s *prev, const char *class_id,