ecore_wayland: Send 'get_supported_aux_hints' only when window calls 'elm_win_aux_hin... 32/49132/2 accepted/tizen/mobile/20151008.004311 accepted/tizen/tv/20151008.004323 accepted/tizen/wearable/20151008.004339 submit/tizen/20151007.074301
authorDuna Oh <duna.oh@samsung.com>
Wed, 7 Oct 2015 05:30:21 +0000 (14:30 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 7 Oct 2015 05:58:34 +0000 (22:58 -0700)
Change-Id: I926570d93078603d051b52182d6ff04076b267cc
Signed-off-by: Duna Oh <duna.oh@samsung.com>
src/lib/ecore_evas/ecore_evas.c
src/lib/ecore_evas/ecore_evas_wayland.h
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_private.h
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c

index dee1256..210a627 100644 (file)
@@ -2210,6 +2210,23 @@ ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val)
 
    Eina_List *ll;
    char *supported_hint;
+   if (ee->prop.aux_hint.supported_list == NULL)
+     {
+        if (!strncmp(ee->driver, "wayland", 7))
+          {
+             Ecore_Evas_Interface_Wayland *iface;
+             iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
+             EINA_SAFETY_ON_NULL_RETURN_VAL(iface, -1);
+
+             if (iface->aux_hint_add)
+               iface->supported_aux_hints_get(ee);
+
+             if (ee->prop.aux_hint.supported_list == NULL)
+               return -1;
+          }
+       else
+         return -1;
+     }
    EINA_LIST_FOREACH(ee->prop.aux_hint.supported_list, ll, supported_hint)
      {
         if (!strncmp(supported_hint, hint, strlen(hint)))
index 81461a3..80e7b04 100644 (file)
@@ -16,6 +16,7 @@ struct _Ecore_Evas_Interface_Wayland
    void (*aux_hint_add)(Ecore_Evas *ee, int id, const char *hint, const char *val);
    void (*aux_hint_change)(Ecore_Evas *ee, int id, const char *val);
    void (*aux_hint_del)(Ecore_Evas *ee, int id);
+   void (*supported_aux_hints_get)(Ecore_Evas *ee);
 };
 
 #endif
index 693024e..2b3fa2d 100644 (file)
@@ -1316,18 +1316,6 @@ _ecore_evas_wl_common_wm_rot_manual_rotation_done(Ecore_Evas *ee)
 }
 
 void
-_ecore_evas_wl_common_aux_hints_supported_update(Ecore_Evas *ee)
-{
-   Ecore_Evas_Engine_Wl_Data *wdata;
-
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-
-   if (!ee) return;
-   wdata = ee->engine.data;
-   ee->prop.aux_hint.supported_list = ecore_wl_window_aux_hints_supported_get(wdata->win);
-}
-
-void
 _ecore_evas_wl_common_raise(Ecore_Evas *ee)
 {
    Ecore_Evas_Engine_Wl_Data *wdata;
@@ -1994,7 +1982,17 @@ _ecore_evas_wayland_pointer_set(Ecore_Evas *ee EINA_UNUSED, int hot_x EINA_UNUSE
 }
 
 static void
-_ecore_evas_wayland_aux_hint_add(Ecore_Evas *ee EINA_UNUSED, int id, const char *hint, const char *val)
+_ecore_evas_wayland_supported_aux_hints_get(Ecore_Evas *ee)
+{
+   Ecore_Evas_Engine_Wl_Data *wdata;
+
+   if (!ee) return;
+   wdata = ee->engine.data;
+   ee->prop.aux_hint.supported_list = ecore_wl_window_aux_hints_supported_get(wdata->win);
+}
+
+static void
+_ecore_evas_wayland_aux_hint_add(Ecore_Evas *ee, int id, const char *hint, const char *val)
 {
    Ecore_Evas_Engine_Wl_Data *wdata;
 
@@ -2004,7 +2002,7 @@ _ecore_evas_wayland_aux_hint_add(Ecore_Evas *ee EINA_UNUSED, int id, const char
 }
 
 static void
-_ecore_evas_wayland_aux_hint_change(Ecore_Evas *ee EINA_UNUSED, int id, const char *val)
+_ecore_evas_wayland_aux_hint_change(Ecore_Evas *ee, int id, const char *val)
 {
    Ecore_Evas_Engine_Wl_Data *wdata;
 
@@ -2014,7 +2012,7 @@ _ecore_evas_wayland_aux_hint_change(Ecore_Evas *ee EINA_UNUSED, int id, const ch
 }
 
 static void
-_ecore_evas_wayland_aux_hint_del(Ecore_Evas *ee EINA_UNUSED, int id)
+_ecore_evas_wayland_aux_hint_del(Ecore_Evas *ee, int id)
 {
    Ecore_Evas_Engine_Wl_Data *wdata;
 
@@ -2042,6 +2040,7 @@ _ecore_evas_wl_interface_new(void)
    iface->aux_hint_add = _ecore_evas_wayland_aux_hint_add;
    iface->aux_hint_change = _ecore_evas_wayland_aux_hint_change;
    iface->aux_hint_del = _ecore_evas_wayland_aux_hint_del;
+   iface->supported_aux_hints_get = _ecore_evas_wayland_supported_aux_hints_get;
 
 #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
    iface->pre_post_swap_callback_set = 
index 9356ee6..75097b0 100644 (file)
@@ -257,8 +257,6 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
         evas_object_layer_set(wdata->frame, EVAS_LAYER_MAX - 1);
      }
 
-   _ecore_evas_wl_common_aux_hints_supported_update(ee);
-
    ee->engine.func->fn_render = _ecore_evas_wl_common_render;
 
    _ecore_evas_register(ee);
index 0a2475e..2f8585d 100644 (file)
@@ -108,7 +108,6 @@ void _ecore_evas_wl_common_wm_rot_preferred_rotation_set(Ecore_Evas *ee, int rot
 void _ecore_evas_wl_common_wm_rot_available_rotations_set(Ecore_Evas *ee, const int *rots, unsigned int count);
 void _ecore_evas_wl_common_wm_rot_manual_rotation_done_set(Ecore_Evas *ee, Eina_Bool set);
 void _ecore_evas_wl_common_wm_rot_manual_rotation_done(Ecore_Evas *ee);
-void _ecore_evas_wl_common_aux_hints_supported_update(Ecore_Evas *ee);
 
 #ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
 void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location);
index 396831a..b04c7e1 100644 (file)
@@ -255,8 +255,6 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
         evas_object_layer_set(wdata->frame, EVAS_LAYER_MAX - 1);
      }
 
-   _ecore_evas_wl_common_aux_hints_supported_update(ee);
-
    ee->engine.func->fn_render = _ecore_evas_wl_common_render;
 
    _ecore_evas_register(ee);