support activate request for wl_surface 06/38906/2
authorBoram Park <boram1288.park@samsung.com>
Thu, 30 Apr 2015 05:02:01 +0000 (14:02 +0900)
committerBoram Park <boram1288.park@samsung.com>
Thu, 30 Apr 2015 08:58:00 +0000 (17:58 +0900)
Change-Id: I2ae3dae66b0f068365608696f6945f7d5fc23e74

src/lib/ecore_wayland/Ecore_Wayland.h
src/lib/ecore_wayland/ecore_wl_window.c
src/lib/ecore_wayland/tizen-policy-client-protocol.h
src/lib/ecore_wayland/tizen-policy-protocol.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c

index dc2ba48eea89c5d04f29b9fd7a5ea4efb2fea9ec..6863cb7990a64490f4221b27d36f699cecae1926 100644 (file)
@@ -586,6 +586,7 @@ EAPI void ecore_wl_window_hide(Ecore_Wl_Window *win);
  * @since 1.2
  */
 EAPI void ecore_wl_window_raise(Ecore_Wl_Window *win);
+EAPI void ecore_wl_window_activate(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized);
 EAPI Eina_Bool ecore_wl_window_maximized_get(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen);
index 6262150a343caca6034e8454dbcb6fcafdd826fe..9223cb35591eaca83fe5d99ad5a800cefc6d7fd5 100644 (file)
@@ -483,6 +483,17 @@ ecore_wl_window_raise(Ecore_Wl_Window *win)
 }
 
 EAPI void 
+ecore_wl_window_activate(Ecore_Wl_Window *win)
+{
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+   if (!win) return;
+
+   if (_ecore_wl_disp->wl.tz_policy)
+     tizen_policy_activate(_ecore_wl_disp->wl.tz_policy, win->surface);
+}
+
+EAPI void
 ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
index 77e1f0357c2505616113cfbf68ae67ff55c19274..4c64911600eb2eea8a6f163602f38c25fd234fd8 100644 (file)
@@ -19,6 +19,7 @@ extern const struct wl_interface tizen_policy_interface;
 extern const struct wl_interface tizen_visibility_interface;
 
 #define TIZEN_POLICY_GET_VISIBILITY    0
+#define TIZEN_POLICY_ACTIVATE  1
 
 static inline void
 tizen_policy_set_user_data(struct tizen_policy *tizen_policy, void *user_data)
@@ -49,6 +50,13 @@ tizen_policy_get_visibility(struct tizen_policy *tizen_policy, struct wl_surface
        return (struct tizen_visibility *) id;
 }
 
+static inline void
+tizen_policy_activate(struct tizen_policy *tizen_policy, struct wl_surface *surface)
+{
+       wl_proxy_marshal((struct wl_proxy *) tizen_policy,
+                        TIZEN_POLICY_ACTIVATE, surface);
+}
+
 #ifndef TIZEN_VISIBILITY_VISIBILITY_ENUM
 #define TIZEN_VISIBILITY_VISIBILITY_ENUM
 enum tizen_visibility_visibility {
index fad29b1e1ab8a6bc344155a66c4fe2265c26018a..4fe408316cca7d6b14a17dff6d3247c04a0e4d47 100644 (file)
@@ -9,15 +9,17 @@ static const struct wl_interface *types[] = {
        NULL,
        &tizen_visibility_interface,
        &wl_surface_interface,
+       &wl_surface_interface,
 };
 
 static const struct wl_message tizen_policy_requests[] = {
        { "get_visibility", "no", types + 1 },
+       { "activate", "o", types + 3 },
 };
 
 WL_EXPORT const struct wl_interface tizen_policy_interface = {
        "tizen_policy", 1,
-       1, tizen_policy_requests,
+       2, tizen_policy_requests,
        0, NULL,
 };
 
index 47fd54dd6fa90942301961743c710c9172f0af16..00d4e9b1bf999f77a0304ed5898266024d99bc15 100644 (file)
@@ -1090,6 +1090,19 @@ _ecore_evas_wl_common_raise(Ecore_Evas *ee)
    ecore_wl_window_raise(wdata->win);
 }
 
+void
+_ecore_evas_wl_common_activate(Ecore_Evas *ee)
+{
+   Ecore_Evas_Engine_Wl_Data *wdata;
+
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+   if (!ee) return;
+   wdata = ee->engine.data;
+   ecore_evas_show(ee);
+   ecore_wl_window_activate(wdata->win);
+}
+
 void
 _ecore_evas_wl_common_title_set(Ecore_Evas *ee, const char *title)
 {
index ea42e5178fa679de7cbb4f6787c25aa0a5853a8f..8a8bb6d89489e845ac3b4e6af8506912658dfa01 100644 (file)
@@ -43,7 +43,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    _ecore_evas_wl_hide,
    _ecore_evas_wl_common_raise,
    NULL, // lower
-   NULL, // activate
+   _ecore_evas_wl_common_activate,
    _ecore_evas_wl_common_title_set,
    _ecore_evas_wl_common_name_class_set,
    _ecore_evas_wl_common_size_min_set,
index 5ed8e12595ad6345435b22aa5dc0881b58924167..60324148a11f1c9d788e70837c651f3889ddc305 100644 (file)
@@ -43,7 +43,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    _ecore_evas_wl_hide,
    _ecore_evas_wl_common_raise,
    NULL, // lower
-   NULL, // activate
+   _ecore_evas_wl_common_activate,
    _ecore_evas_wl_common_title_set,
    _ecore_evas_wl_common_name_class_set,
    _ecore_evas_wl_common_size_min_set,