aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-17 16:02:53 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-19 12:41:16 -0400
commit5ebdf8f3414d00d54d532dcfbe0e8236d8fe9898 (patch)
tree67831e00e0fae55d479bb02c59d70f3e4f6852d2 /src/lib/elementary/efl_ui_win.c
parentecore-wl2: add ecore_wl2_window_activated_get() (diff)
downloadefl-5ebdf8f3414d00d54d532dcfbe0e8236d8fe9898.tar.gz
wayland: use shell activated state to indicate focus in csd
the current (v6) xdg-shell spec reads as follows: Client window decorations should be painted as if the window is active. Do not assume this means that the window actually has keyboard or pointer focus. so this is not equivalent to receiving/losing input focus and should not be propagated as such @fix
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 5f84f914c6..921767aab7 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1552,6 +1552,13 @@ _elm_win_state_change(Ecore_Evas *ee)
else
efl_event_callback_legacy_call(obj, EFL_UI_WIN_EVENT_UNSTICK, NULL);
}
+#ifdef HAVE_ELEMENTARY_WL2
+ if (sd->wl.win)
+ {
+ if (sd->csd.cur_focus != ecore_wl2_window_activated_get(sd->wl.win))
+ _elm_win_frame_style_update(sd, 0, 1);
+ }
+#endif
if (ch_fullscreen)
{
_elm_win_frame_style_update(sd, 0, 1);
@@ -4365,7 +4372,13 @@ _elm_win_frame_style_update(Efl_Ui_Win_Data *sd, Eina_Bool force_emit, Eina_Bool
maximized = sd->maximized;
shadow = sd->csd.need_shadow && (!sd->fullscreen) && (!sd->maximized);
if (alpha && borderless) shadow = 0;
+#ifdef HAVE_ELEMENTARY_WL2
+ if (sd->wl.win)
+ focus = ecore_wl2_window_activated_get(sd->wl.win);
+ else
+#else
focus = ecore_evas_focus_get(sd->ee);
+#endif
bg_solid = sd->csd.need_bg_solid;
bg_standard = sd->csd.need_bg_standard;
unresizable = sd->csd.need_unresizable;