summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--[-rwxr-xr-x]client/CMakeLists.txt23
-rw-r--r--[-rwxr-xr-x]client/ug-client.c22
2 files changed, 27 insertions, 18 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 5100421..3bb2d21 100755..100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,24 +1,21 @@
SET(CLIENT ug-client)
SET(CLIENT_SRCS ug-client.c)
SET(CLIENT_VENDOR samsung)
-SET(CLIENT_DIR /usr/bin)
+SET(CLIENT_DIR ${TZ_SYS_BIN})
SET(CLIENT_LOCALEDIR /usr/share/locale)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED
- capi-appfw-application
- appcore-efl
- appsvc
- bundle
- ecore-x
- edje
- dlog
- elementary
- evas
- x11
- vconf)
+SET(CLIENT_PKGS_CHECK_MODULES "capi-appfw-application capi-system-runtime-info appcore-efl appsvc bundle edje dlog elementary evas vconf")
+
+IF (with_x)
+ PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED ${CLIENT_PKGS_CHECK_MODULES} ecore-x x11)
+ENDIF(with_x)
+
+IF (with_wayland)
+ PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED ${CLIENT_PKGS_CHECK_MODULES})
+ENDIF(with_wayland)
FOREACH(flag ${CLIENT_PKGS_CFLAGS})
SET(CLIENT_CFLAGS "${CLIENT_CFLAGS} ${flag}")
diff --git a/client/ug-client.c b/client/ug-client.c
index 18adf88..0c79d1e 100755..100644
--- a/client/ug-client.c
+++ b/client/ug-client.c
@@ -22,7 +22,11 @@
#include <stdio.h>
#include <appcore-efl.h>
#include <ui-gadget.h>
+
+#ifndef WAYLAND
#include <Ecore_X.h>
+#endif
+
#include <dlog.h>
#include <aul.h>
#include <app.h>
@@ -30,13 +34,14 @@
#include "ug-client.h"
-#include <Ecore_X.h>
-#include <utilX.h>
+#include <tzplatform_config.h>
#ifdef LOG_TAG
#undef LOG_TAG
#endif
+#define PATH_UG_LAUNCHER tzplatform_mkpath(TZ_SYS_BIN,"ug-launcher")
+
#define LOG_TAG "UI_GADGET_CLIENT"
static void prt_usage(const char *cmd)
@@ -215,6 +220,7 @@ static void profile_changed_cb(void *data, Evas_Object * obj, void *event)
static Evas_Object *create_win(const char *name)
{
+ Ecore_Evas *ee;
Evas_Object *eo;
int w, h;
@@ -226,8 +232,8 @@ static Evas_Object *create_win(const char *name)
win_del, NULL);
/* disable destktop mode
evas_object_smart_callback_add(eo, "profile,changed", profile_changed_cb, NULL); */
- ecore_x_window_size_get(ecore_x_window_root_first_get(),
- &w, &h);
+ ee = ecore_evas_ecore_evas_get(evas_object_evas_get(eo));
+ evas_output_size_get(ee, &w, &h);
evas_object_resize(eo, w, h);
elm_win_indicator_mode_set(eo,ELM_WIN_INDICATOR_SHOW);
@@ -314,7 +320,10 @@ static int app_create(void *data)
if (win == NULL)
return -1;
ad->win = win;
+
+#ifndef WAYLAND
UG_INIT_EFL(ad->win, UG_OPT_INDICATOR_ENABLE);
+#endif
bg = elm_bg_add(win);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -348,12 +357,14 @@ static int app_create(void *data)
} else {
LOGE("elm win rotation get error");
}
+ /*
if(elm_win_wm_rotation_supported_get(win)) {
int rots[4] = { 0, 90, 180, 270 };
elm_win_wm_rotation_available_rotations_set(win, (const int*)&rots, 4);
} else {
LOGW("wm rotation supported get error");
}
+ */
evas_object_smart_callback_add(win, "wm,rotation,changed", rotate, data);
appcore_set_event_callback(APPCORE_EVENT_LOW_MEMORY, low_memory, ad);
@@ -435,6 +446,7 @@ static int app_reset(bundle *b, void *data)
Ecore_X_Window id2 = elm_win_xwindow_get(ad->win);
ret = appsvc_request_transient_app(b, id2, svc_cb, "svc test");
+
if (ret) {
LOGD("fail to request transient app: return value(%d)", ret);
if(vconf_notify_key_changed(VCONFKEY_IDLE_SCREEN_TOP, _home_screen_top_cb, ad) != 0) {
@@ -513,7 +525,7 @@ int main(int argc, char *argv[])
cmdlen = strlen(argv[0]);
if (strncmp(argv[0], "ug-launcher", cmdlen) == 0
- || strncmp(argv[0], "/usr/bin/ug-launcher", cmdlen) == 0) {
+ || strncmp(argv[0], PATH_UG_LAUNCHER , cmdlen) == 0) {
while ((opt = getopt(argc, argv, "n:d:")) != -1) {
switch (opt) {
case 'n':