seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6fa2e3da2bb17db067599c5e4d2ac28bd0d1c636

commit 6fa2e3da2bb17db067599c5e4d2ac28bd0d1c636
Author: Daniel Juyung Seo <[email protected]>
Date:   Tue Dec 16 01:57:24 2014 +0900

    win: Support runtime alpha window switch on theme change.
    
    Once the window alpha is on, it would not go back to non-alpha window
    automatically.
    
    - non-alpha theme -> alpha theme: switch to alpha window
    - alpha theme -> non-alpha theme: stay in alpha window
    
    @feature
---
 src/lib/elm_win.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 8e29060..ebae9a5 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -3556,20 +3556,6 @@ _elm_win_constructor(Eo *obj, Elm_Win_Data *sd, const 
char *name, Elm_Win_Type t
         eo_do(obj, 
eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, NULL));
      }
 
-   if (edje_object_data_get(sd->layout, "alpha"))
-     {
-        const char *s = edje_object_data_get(sd->layout, "alpha");
-        if (s)
-          {
-             if (!strcmp(s, "1") ||
-                 !strcmp(s, "true"))
-               {
-                  sd->application_alpha = 1;
-                  _elm_win_apply_alpha(obj, sd);
-               }
-          }
-     }
-
    evas_object_show(sd->layout);
 }
 
@@ -4825,6 +4811,7 @@ static Eina_Bool
 _elm_win_theme_internal(Eo *obj, Elm_Win_Data *sd)
 {
    Eina_Bool ret = EINA_FALSE;
+   const char *s;
 
    if (!_elm_theme_object_set(obj, sd->layout, "win", "base",
                                elm_widget_style_get(obj)))
@@ -4837,6 +4824,20 @@ _elm_win_theme_internal(Eo *obj, Elm_Win_Data *sd)
    evas_object_smart_callback_call(obj, SIG_THEME_CHANGED, NULL);
    eo_do(obj, ret = elm_obj_widget_disable());
 
+   if (!sd->theme_alpha && !sd->application_alpha)
+     {
+        s = edje_object_data_get(sd->layout, "alpha");
+        if (s)
+          {
+             if (!strcmp(s, "1") ||
+                 !strcmp(s, "true"))
+               {
+                  sd->application_alpha = 1;
+                  _elm_win_apply_alpha(obj, sd);
+               }
+          }
+     }
+
    return ret;
 }
 

-- 


Reply via email to