aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-11-25 11:28:16 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-11-28 10:57:15 +0900
commitf1418dbb2058da244ee5e92cd97bbf992029eb70 (patch)
tree3c187cae51134146a1aaddc8d3f5b1bf531d96cf /src/lib/elementary/efl_ui_win.c
parentelm_code: Add some missing indent tests (diff)
downloadefl-f1418dbb2058da244ee5e92cd97bbf992029eb70.tar.gz
win: Avoid calling need_frame_adjust all the time
This function was meant to be called only before finalize. This avoids getenv and string compares.
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 7a61c70050..607dc9d6b9 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4151,7 +4151,6 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool
return;
}
- _elm_win_need_frame_adjust(sd, ecore_evas_engine_name_get(sd->ee));
if ((sd->type == ELM_WIN_INLINED_IMAGE) ||
(sd->type == ELM_WIN_SOCKET_IMAGE))
{
@@ -4160,6 +4159,10 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool
sd->csd.need_unresizable = EINA_TRUE;
sd->csd.need_menu = EINA_FALSE;
}
+ else
+ {
+ sd->csd.need_shadow = sd->csd.need && (!sd->maximized);
+ }
alpha = sd->application_alpha || sd->theme_alpha;
borderless = sd->csd.need_borderless || (!sd->csd.need) || sd->fullscreen;
@@ -4354,7 +4357,6 @@ _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine)
/* this is for debug only - don't keep forever, it's not an api! */
s = getenv("EFL_WIN_FRAME_MODE");
-
sd->csd.wayland = (eina_streq(engine, ELM_WAYLAND_SHM) ||
eina_streq(engine, ELM_WAYLAND_EGL));
@@ -4366,9 +4368,6 @@ _elm_win_need_frame_adjust(Efl_Ui_Win_Data *sd, const char *engine)
sd->csd.need = EINA_FALSE;
else
sd->csd.need = sd->csd.wayland;
-
- /* for now CSD implies shadows as well */
- sd->csd.need_shadow = sd->csd.need && (!sd->maximized);
}
static Eo *