summaryrefslogtreecommitdiff
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
parente7bb795aba01ad0def75c2c3b6eac2cdfe47cdd0 (diff)
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
-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
99 Ecore_X_Window xwin; 99 Ecore_X_Window xwin;
100 Ecore_Event_Handler *client_message_handler; 100 Ecore_Event_Handler *client_message_handler;
101 Ecore_Event_Handler *property_handler; 101 Ecore_Event_Handler *property_handler;
102 Eina_Bool shaped : 1;
102 } x; 103 } x;
103#endif 104#endif
104#ifdef HAVE_ELEMENTARY_WL2 105#ifdef HAVE_ELEMENTARY_WL2
@@ -444,7 +445,7 @@ elm_process_state_get(void)
444} 445}
445 446
446static void 447static void
447_elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd) 448_elm_win_apply_alpha(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
448{ 449{
449 Eina_Bool enabled; 450 Eina_Bool enabled;
450 451
@@ -462,16 +463,13 @@ _elm_win_apply_alpha(Eo *obj, Efl_Ui_Win_Data *sd)
462 if (sd->x.xwin) 463 if (sd->x.xwin)
463 { 464 {
464 enabled |= (sd->csd.need && !sd->fullscreen); 465 enabled |= (sd->csd.need && !sd->fullscreen);
465 if (enabled) 466 if (!ecore_x_screen_is_composited(0))
466 { 467 {
467 if (!ecore_x_screen_is_composited(0)) 468 if (enabled || (!sd->x.shaped))
468 elm_win_shaped_set(obj, enabled); 469 TRAP(sd, shaped_set, enabled);
469 else
470 TRAP(sd, alpha_set, enabled);
471 } 470 }
472 else 471 else
473 TRAP(sd, alpha_set, enabled); 472 TRAP(sd, alpha_set, enabled);
474 _elm_win_xwin_update(sd);
475 } 473 }
476 else 474 else
477#else 475#else
@@ -8248,9 +8246,12 @@ elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped)
8248 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); 8246 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
8249 if (!sd) return; 8247 if (!sd) return;
8250 8248
8251 TRAP(sd, shaped_set, shaped); 8249 shaped = !!shaped;
8250
8252#ifdef HAVE_ELEMENTARY_X 8251#ifdef HAVE_ELEMENTARY_X
8253 _elm_win_xwin_update(sd); 8252 if (sd->x.shaped == shaped) return;
8253 sd->x.shaped = shaped;
8254 TRAP(sd, shaped_set, shaped);
8254#endif 8255#endif
8255} 8256}
8256 8257