API add : e_policy_wl_activate 91/107191/4 accepted/tizen/common/20161227.192540 accepted/tizen/ivi/20161228.083409 accepted/tizen/mobile/20161228.083226 accepted/tizen/tv/20161228.083258 accepted/tizen/wearable/20161228.083353 submit/tizen/20161227.070909 submit/tizen_3.0/20161227.071113
authorSungbae Park <sb34.park@samsung.com>
Tue, 27 Dec 2016 06:06:02 +0000 (15:06 +0900)
committerByun <ks4070.byun@samsung.com>
Tue, 27 Dec 2016 06:32:22 +0000 (22:32 -0800)
e_policy_wl_activate api is give activate function.
calling e_client_activate function directly from a module is dangerous.
then we need activate function in consideration of deiconify, splash screen, etc policy .

Signed-off-by: Sungbae Park <sb34.park@samsung.com>
Change-Id: I4ace4e506d69b415762060d9feae9a0d5e3fa9aa

src/bin/e_policy_wl.c
src/bin/e_policy_wl.h

index 377f2bf4efd0cadc1da0181204c00ebf25b71733..8c6563f6a6be15a6d67ec292f45eb11aac2066ec 100644 (file)
@@ -1244,16 +1244,14 @@ e_policy_wl_position_send(E_Client *ec)
 // --------------------------------------------------------
 // stack: activate, raise, lower
 // --------------------------------------------------------
-static void
-_tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
-{
-   E_Client *ec;
 
-   ec = wl_resource_get_user_data(surf);
+E_API void
+e_policy_wl_activate(E_Client *ec)
+{
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
-   ELOGF("TZPOL", "ACTIVATE", ec->pixmap, ec);
+   ELOGF("TZPOL", "REAL ACTIVATE", ec->pixmap, ec);
 
    if ((!starting) && (!ec->focused) && (!ec->visibility.force_obscured))
      {
@@ -1273,6 +1271,19 @@ _tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resourc
      e_policy_stack_check_above_lockscreen(ec, ec->layer, NULL, EINA_TRUE);
 }
 
+static void
+_tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
+{
+   E_Client *ec;
+
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
+   EINA_SAFETY_ON_NULL_RETURN(ec->frame);
+
+   ELOGF("TZPOL", "ACTIVATE", ec->pixmap, ec);
+   e_policy_wl_activate(ec);
+}
+
 E_API void
 e_policy_wl_stack_changed_send(E_Client *ec)
 {
index cb98b029095a2a8e416d5046a42a43c3c6a8459a..e9eeb9de36285f755851210e86792ff012dc00c6 100644 (file)
@@ -53,4 +53,7 @@ EINTERN void e_policy_wl_clipboard_data_selected_send(E_Client *ec);
 /* aux_message */
 E_API void e_policy_wl_stack_changed_send(E_Client *ec);
 
+/* activate */
+E_API void e_policy_wl_activate(E_Client *ec);
+
 #endif /* E_MOD_WL_H */