Fix the syspopup_create API 92/76892/3
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 28 Jun 2016 00:03:45 +0000 (09:03 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 28 Jun 2016 00:21:36 +0000 (09:21 +0900)
- eff_util_set_notification_window_level() needs the
"http://tizen.org/privilege/window.priority.set" privilege.

Change-Id: Id380c3b7e509407ac4e1b6f165abe1a483d9530c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/syspopup.h
syspopup-app/org.tizen.syspopup-app.xml.in
syspopup/syspopup_wayland.c

index 371dd0c75a50b7647b5401dde9f5a74f6a1212b9..0478d105b649282e89a02818f1ead5ee33dec11b 100755 (executable)
@@ -83,6 +83,7 @@ typedef struct _syspopup_handler syspopup_handler;
  *             and set system popup properties based on system popup information DB.\n
  *             system popup properties to be set : timeout, default action type, ....
  *
+ * @privilege   %http://tizen.org/privilege/window.priority.set
  * @param[in]   b              bundle received by app_reset handler (included system popup name)
  * @param[in]   handler         user-supplied handler for handling system popup internal event.
  * @param[in]  parent          parent window created with elm_win_add.
index 1fe95dc627354578e5035c23660b1425c9eb123f..6e21a3cc30f9a5be58793e292452a076e1f262d9 100755 (executable)
@@ -6,4 +6,7 @@
        <ui-application appid="org.tizen.syspopup-app" exec="/usr/bin/syspopup-app" nodisplay="true" multiple="false" type="capp" taskmanage="false">
                <label>syspopup-app</label>
        </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/window.priority.set</privilege>
+       </privileges>
 </manifest>
index 89d46bb20582f827de0a9da4378af14aebd2c855..fcfe26e2cbdc753c248d268de74e371194bf77bd 100644 (file)
@@ -122,6 +122,7 @@ int wl_syspopup_reset(bundle *b)
        syspopup *sp;
        Ecore_Wl_Window *wl_win;
        efl_util_notification_level_e level;
+       int ret;
 
        popup_name = _syspopup_get_name_from_bundle(b);
        if (popup_name == NULL)
@@ -145,7 +146,12 @@ int wl_syspopup_reset(bundle *b)
        ecore_wl_window_type_set(wl_win, ECORE_WL_WINDOW_TYPE_NOTIFICATION);
 
        level = __wl_syspopup_get_notification_level(info->prio);
-       efl_util_set_notification_window_level(sp->win, level);
+       ret = efl_util_set_notification_window_level(sp->win, level);
+       if (ret != EFL_UTIL_ERROR_NONE) {
+               _E("Failed to set notification window level - %d", ret);
+               return -1;
+       }
+
        if (info->focus)
                ecore_wl_window_focus_skip_set(wl_win, EINA_TRUE);