devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0f4bbb7df6b3d19ce4b87af8b02657f8ce8fc482

commit 0f4bbb7df6b3d19ce4b87af8b02657f8ce8fc482
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Wed Jul 11 15:50:09 2018 -0400

    elm/win: correctly track and set x11 shaped state
    
    Summary:
    when applying alpha in a non-composited environment, shaped should be
    set. when removing alpha in a non-composited environment, shaped should
    be unset if it has not previously been explicitly set
    
    @fix
    
    Reviewers: devilhorns
    
    Subscribers: cedric, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D6568
---
 src/lib/elementary/efl_ui_win.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index c1477b703d..c753e76675 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -99,6 +99,7 @@ struct _Efl_Ui_Win_Data
       Ecore_X_Window       xwin;
       Ecore_Event_Handler *client_message_handler;
       Ecore_Event_Handler *property_handler;
+      Eina_Bool shaped : 1;
    } x;
 #endif
 #ifdef HAVE_ELEMENTARY_WL2
@@ -444,7 +445,7 @@ elm_process_state_get(void)
 }
 
 static void
-_elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd)
+_elm_win_apply_alpha(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
 {
    Eina_Bool enabled;
 
@@ -462,16 +463,13 @@ _elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd)
         if (sd->x.xwin)
           {
              enabled |= (sd->csd.need && !sd->fullscreen);
-             if (enabled)
+             if (!ecore_x_screen_is_composited(0))
                {
-                  if (!ecore_x_screen_is_composited(0))
-                    elm_win_shaped_set(obj, enabled);
-                  else
-                    TRAP(sd, alpha_set, enabled);
+                  if (enabled || (!sd->x.shaped))
+                    TRAP(sd, shaped_set, enabled);
                }
              else
                TRAP(sd, alpha_set, enabled);
-             _elm_win_xwin_update(sd);
           }
         else
 #else
@@ -8248,9 +8246,12 @@ elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped)
    Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
    if (!sd) return;
 
-   TRAP(sd, shaped_set, shaped);
+   shaped = !!shaped;
+
 #ifdef HAVE_ELEMENTARY_X
-   _elm_win_xwin_update(sd);
+   if (sd->x.shaped == shaped) return;
+   sd->x.shaped = shaped;
+   TRAP(sd, shaped_set, shaped);
 #endif
 }
 

-- 


Reply via email to