aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-11 15:50:09 -0400
committerChris Michael <cp.michael@samsung.com>2018-07-11 15:50:09 -0400
commit0f4bbb7df6b3d19ce4b87af8b02657f8ce8fc482 (patch)
tree14372aae9d7cea4e34aaaa2d4bdd958de93d3c26 /src/lib/elementary/efl_ui_win.c
parentcanvas vg_loader: close opened file after using it. (diff)
downloadefl-0f4bbb7df6b3d19ce4b87af8b02657f8ce8fc482.tar.gz
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
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c19
1 files 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
}