elm_win: fix precreation window logic.
authorHosang Kim <hosang12.kim@samsung.com>
Fri, 11 Nov 2016 08:32:51 +0000 (17:32 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 17 Nov 2016 08:07:49 +0000 (17:07 +0900)
If window's type is ELM_WIN_SOCKET_IMAGE or ELM_WIN_INLINED_IMAGE,
window must be created.

Change-Id: I3a78390e99c62842920550c23f65fb151de2dd89

src/lib/elm_win.c

index 081a34c..8ba8784 100644 (file)
@@ -3801,26 +3801,44 @@ elm_win_add(Evas_Object *parent,
      {
         ELM_WIN_DATA_GET(_precreated_win_obj, sd);
 
-        if (sd)
+        if ((type != ELM_WIN_SOCKET_IMAGE) &&
+            (type != ELM_WIN_INLINED_IMAGE))
           {
-             if (sd->parent == parent)
+             if (sd)
                {
-                  Evas_Object *tmp = _precreated_win_obj;
-                  TRAP(sd, name_class_set, name, _elm_appname);
-                  TRAP(sd, title_set, sd->title ? sd->title : name);
-                  _precreated_win_obj = NULL;
-                  if (sd->type != type)
-                    elm_win_type_set(tmp, type);
-                  INF("Return precreated obj(%p).", tmp);
-
-//TIZEN_ONLY(20160628):  Add Performance log for cold booting
+                  if (sd->parent == parent)
+                    {
+                       Evas_Object *tmp = _precreated_win_obj;
+                       TRAP(sd, name_class_set, name, _elm_appname);
+                       TRAP(sd, title_set, sd->title ? sd->title : name);
+                       _precreated_win_obj = NULL;
+                       if (sd->type != type)
+                         elm_win_type_set(tmp, type);
+                       INF("Return precreated obj(%p).", tmp);
+
+                       //TIZEN_ONLY(20160628):  Add Performance log for cold booting
 #ifdef ENABLE_TTRACE
-                  traceEnd(TTRACE_TAG_EFL);
+                       traceEnd(TTRACE_TAG_EFL);
 #endif
-//
-                  return tmp;
+                       //
+                       return tmp;
+                    }
                }
           }
+        Evas_Object *bg = elm_bg_precreated_object_get();
+        if (bg)
+          {
+             evas_object_del(bg);
+             elm_bg_precreated_object_set(NULL);
+          }
+        Evas_Object *conform = elm_conformant_precreated_object_get();
+        if (conform)
+          {
+             evas_object_del(conform);
+             elm_conformant_precreated_object_set(NULL);
+          }
+        evas_object_del(_precreated_win_obj);
+        _precreated_win_obj = NULL;
      }
 //