simotek pushed a commit to branch elementary-1.17.

http://git.enlightenment.org/core/elementary.git/commit/?id=3ec7e05ef0275902b7fcc63049ffca2f2ba603cd

commit 3ec7e05ef0275902b7fcc63049ffca2f2ba603cd
Author: Simon Lees <sfl...@suse.de>
Date:   Tue Jul 19 09:54:18 2016 +0930

    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
---
 src/lib/elm_win.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 7ae5efd..5a569d1 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)
    eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_THEME_CHANGED, NULL));
    eo_do(obj, ret = elm_obj_widget_disable());
 
+   s = edje_object_data_get(sd->edje, "alpha");
    if (!sd->theme_alpha)
-     {
-        s = edje_object_data_get(sd->edje, "alpha");
+     {        
         if (s)
           {
              if (!strcmp(s, "1") ||
@@ -5396,6 +5396,15 @@ _elm_win_theme_internal(Eo *obj, Elm_Win_Data *sd)
                }
           }
      }
+   else
+      {
+         if (!s || ((strcmp(s, "1") != 0) && (strcmp(s, "false") != 0)))
+            {
+               sd->theme_alpha = 0;
+               _elm_win_apply_alpha(obj, sd);
+            }
+      }
+ 
 
    return ret;
 }

-- 


Reply via email to