From 0d69ca018d40e1155e9ad2f6158d64ad63cf7b76 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 17 Jan 2018 14:12:34 +0900 Subject: [PATCH] win: Fix standard window bg with custom themes Ref T6579 See also D5740 --- src/lib/elementary/efl_ui_win.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 187bda7..224ef99 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -8005,10 +8005,21 @@ _elm_win_standard_init(Eo *obj) } else { + Eo *bg; + /* Legacy theme compatibility */ DBG("Detected legacy theme used for elm_bg. Swallowing object."); sd->csd.need_bg_solid = EINA_FALSE; - _elm_win_bg_set(sd, efl_add(EFL_UI_BG_WIDGET_CLASS, obj)); + if (sd->legacy.ctor) + bg = elm_bg_add(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, obj); + } + _elm_win_bg_set(sd, bg); } _elm_win_frame_style_update(sd, 0, 1); -- 2.7.4