summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Lees <sflees@suse.de>2016-07-19 09:54:18 +0930
committerSimon Lees <sflees@suse.de>2016-07-19 09:54:18 +0930
commit3ec7e05ef0275902b7fcc63049ffca2f2ba603cd (patch)
treeb48a329af088f8eca9e577a5f29d0d4147c821a9
parent864f957df9d26e262fad67bb6ed7387c920c06d5 (diff)
win: Set window alpha when changing theme
This sets the window alpha back to 0 when switching from a theme with alpha to one without. Thanks @bu5hm4n for asking about this. Backport of jpeg's d2fcfafb465fb5f7a9d1f167b811b9cc323bc206
-rw-r--r--src/lib/elm_win.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 7ae5efd11..5a569d1a4 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -5383,9 +5383,9 @@ _elm_win_theme_internal(Eo *obj, Elm_Win_Data *sd)
5383 eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_THEME_CHANGED, NULL)); 5383 eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_THEME_CHANGED, NULL));
5384 eo_do(obj, ret = elm_obj_widget_disable()); 5384 eo_do(obj, ret = elm_obj_widget_disable());
5385 5385
5386 s = edje_object_data_get(sd->edje, "alpha");
5386 if (!sd->theme_alpha) 5387 if (!sd->theme_alpha)
5387 { 5388 {
5388 s = edje_object_data_get(sd->edje, "alpha");
5389 if (s) 5389 if (s)
5390 { 5390 {
5391 if (!strcmp(s, "1") || 5391 if (!strcmp(s, "1") ||
@@ -5396,6 +5396,15 @@ _elm_win_theme_internal(Eo *obj, Elm_Win_Data *sd)
5396 } 5396 }
5397 } 5397 }
5398 } 5398 }
5399 else
5400 {
5401 if (!s || ((strcmp(s, "1") != 0) && (strcmp(s, "false") != 0)))
5402 {
5403 sd->theme_alpha = 0;
5404 _elm_win_apply_alpha(obj, sd);
5405 }
5406 }
5407
5399 5408
5400 return ret; 5409 return ret;
5401} 5410}