efl_ui_win: Fix to check efl_ui_bg_widget theme version for non-legacy win
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 9 Nov 2018 04:59:05 +0000 (13:59 +0900)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 20 Nov 2018 06:28:27 +0000 (15:28 +0900)
Check efl_ui_bg_widget theme version instead of elm_bg for non-legacy
win if win must swallow bg manually or not.

src/lib/elementary/efl_ui_win.c

index c931470..bec65a3 100644 (file)
@@ -8417,7 +8417,15 @@ _elm_win_bg_must_swallow(Efl_Ui_Win_Data *sd)
         sd->legacy.bg_must_swallow = 1;
         sd->legacy.bg_must_swallow_init = 1;
 
-        bg = elm_bg_add(sd->obj);
+        if (sd->legacy.ctor)
+          bg = elm_bg_add(sd->obj);
+        else
+          {
+             // Note: This code path is probably not necessary (custom legacy
+             // theme but efl_add'ed window -- all efl_add'ed widgets would
+             // use default theme)
+             bg = efl_add(EFL_UI_BG_WIDGET_CLASS, sd->obj);
+          }
         wd = efl_data_scope_get(bg, EFL_UI_WIDGET_CLASS);
         if (wd)
           {