ecore_wayland/ecore_evas: update aux hint supported list when supported_get is called
authorMinJeong Kim <minjjj.kim@samsung.com>
Wed, 16 Nov 2016 07:44:18 +0000 (16:44 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 17 Nov 2016 07:54:18 +0000 (16:54 +0900)
Change-Id: I878e962d80cc44c6eefc787e4e05a5cc9e84cf1a
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/lib/ecore_evas/ecore_evas.c
src/lib/ecore_wayland/ecore_wl.c

index 05b2d8f..8525023 100755 (executable)
@@ -2228,6 +2228,16 @@ ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee)
                          "ecore_evas_aux_hints_supported_get");
         return NULL;
      }
+
+   if (!strncmp(ee->driver, "wayland", 7))
+     {
+        Ecore_Evas_Interface_Wayland *iface;
+        iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
+
+        if ((iface) && (iface->supported_aux_hints_get))
+          iface->supported_aux_hints_get(ee);
+     }
+
    return ee->prop.aux_hint.supported_list;
 }
 
@@ -2274,7 +2284,7 @@ ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val)
              iface = (Ecore_Evas_Interface_Wayland *)_ecore_evas_interface_get(ee, "wayland");
              EINA_SAFETY_ON_NULL_RETURN_VAL(iface, -1);
 
-             if (iface->aux_hint_add)
+             if (iface->supported_aux_hints_get)
                iface->supported_aux_hints_get(ee);
 
              if (ee->prop.aux_hint.supported_list == NULL)
index 3c01b1b..2718750 100644 (file)
@@ -1970,6 +1970,8 @@ _ecore_wl_cb_supported_aux_hints(void *data EINA_UNUSED, struct tizen_policy *ti
    str = calloc(num_hints, sizeof(char *));
    if (!str) return;
 
+   _ecore_wl_window_aux_hint_free(win);
+
    while ((const char *)p < ((const char *)hints->data + hints->size))
      {
         str[i] = (char *)eina_stringshare_add(p);