diff options
author | Duna Oh <duna.oh@samsung.com> | 2015-06-02 13:04:50 +0900 |
---|---|---|
committer | Gwanglim Lee <gl77.lee@samsung.com> | 2015-06-01 23:23:04 -0700 |
commit | 5cfe089f7dbf172e61f3c5c42c880fd8f641d433 (patch) | |
tree | c4a82823d9a47772248115ae238b80930e2a8765 | |
parent | 7236e16a3855ff748ee5744a1cd426b341a61ebf (diff) | |
download | efl-5cfe089f7dbf172e61f3c5c42c880fd8f641d433.tar.gz |
Implementation 'focus_skip_set' request for wl_surface
Change-Id: Ide885bcb2211d39a6b17459a5662026db185528f
Signed-off-by: Duna Oh <duna.oh@samsung.com>
8 files changed, 41 insertions, 3 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h index 3425199435..dff3dfacd2 100644 --- a/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/src/lib/ecore_wayland/Ecore_Wayland.h @@ -637,6 +637,7 @@ EAPI void ecore_wl_window_cursor_from_name_set(Ecore_Wl_Window *win, const char EAPI void ecore_wl_window_cursor_default_restore(Ecore_Wl_Window *win); EAPI void ecore_wl_window_parent_set(Ecore_Wl_Window *win, Ecore_Wl_Window *parent); EAPI void ecore_wl_window_position_set(Ecore_Wl_Window *win, int x, int y); +EAPI void ecore_wl_window_focus_skip_set(Ecore_Wl_Window *win, Eina_Bool focus_skip); /** * Iconify a window diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 51d80a6a93..6656376f57 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c @@ -822,6 +822,19 @@ ecore_wl_window_position_set(Ecore_Wl_Window *win, int x, int y) } } +EAPI void +ecore_wl_window_focus_skip_set(Ecore_Wl_Window *win, Eina_Bool focus_skip) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!win) return; + if (focus_skip) + { + if ((win->surface) && (_ecore_wl_disp->wl.tz_policy)) + tizen_policy_focus_skip_set(_ecore_wl_disp->wl.tz_policy, win->surface); + } + } + /* @since 1.12 */ EAPI void ecore_wl_window_iconified_set(Ecore_Wl_Window *win, Eina_Bool iconified) diff --git a/src/lib/ecore_wayland/tizen-policy-client-protocol.h b/src/lib/ecore_wayland/tizen-policy-client-protocol.h index bf3f0d9532..3308fecf15 100644 --- a/src/lib/ecore_wayland/tizen-policy-client-protocol.h +++ b/src/lib/ecore_wayland/tizen-policy-client-protocol.h @@ -23,6 +23,7 @@ extern const struct wl_interface wl_surface_interface; #define TIZEN_POLICY_GET_VISIBILITY 0 #define TIZEN_POLICY_ACTIVATE 1 #define TIZEN_POLICY_POSITION_SET 2 +#define TIZEN_POLICY_FOCUS_SKIP_SET 3 static inline void tizen_policy_set_user_data(struct tizen_policy *tizen_policy, void *user_data) @@ -67,6 +68,13 @@ tizen_policy_position_set(struct tizen_policy *tizen_policy, struct wl_surface * TIZEN_POLICY_POSITION_SET, surface, x, y); } +static inline void +tizen_policy_focus_skip_set(struct tizen_policy *tizen_policy, struct wl_surface *surface) +{ + wl_proxy_marshal((struct wl_proxy *) tizen_policy, + TIZEN_POLICY_FOCUS_SKIP_SET, surface); +} + #ifndef TIZEN_VISIBILITY_VISIBILITY_ENUM #define TIZEN_VISIBILITY_VISIBILITY_ENUM enum tizen_visibility_visibility { diff --git a/src/lib/ecore_wayland/tizen-policy-protocol.c b/src/lib/ecore_wayland/tizen-policy-protocol.c index 884754eba3..9b182105ab 100644 --- a/src/lib/ecore_wayland/tizen-policy-protocol.c +++ b/src/lib/ecore_wayland/tizen-policy-protocol.c @@ -13,17 +13,19 @@ static const struct wl_interface *types[] = { &wl_surface_interface, NULL, NULL, + &wl_surface_interface, }; static const struct wl_message tizen_policy_requests[] = { { "get_visibility", "no", types + 1 }, { "activate", "o", types + 3 }, { "position_set", "oii", types + 4 }, + { "focus_skip_set", "o", types + 7 }, }; WL_EXPORT const struct wl_interface tizen_policy_interface = { "tizen_policy", 1, - 3, tizen_policy_requests, + 4, tizen_policy_requests, 0, NULL, }; diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 99adb03778..845e46938f 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -1383,6 +1383,19 @@ _ecore_evas_wl_common_ignore_events_set(Ecore_Evas *ee, int ignore) /* NB: Hmmm, may need to pass this to ecore_wl_window in the future */ } +void +_ecore_evas_wl_common_focus_skip_set(Ecore_Evas *ee, Eina_Bool on) +{ + Ecore_Evas_Engine_Wl_Data *wdata; + + wdata = ee->engine.data; + + if (ee->prop.focus_skip == on) return; + + ee->prop.focus_skip = on; + ecore_wl_window_focus_skip_set(wdata->win, on); +} + int _ecore_evas_wl_common_pre_render(Ecore_Evas *ee) { diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c index f87a6bbca2..a5f772b1a6 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c @@ -72,7 +72,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func = NULL, // urgent set NULL, // modal set NULL, // demand attention set - NULL, // focus skip set + _ecore_evas_wl_common_focus_skip_set, NULL, // _ecore_evas_wl_common_render, _ecore_evas_wl_common_screen_geometry_get, _ecore_evas_wl_common_screen_dpi_get, diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h index 597c776feb..395a1e4239 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h @@ -70,6 +70,7 @@ void _ecore_evas_wl_common_iconified_set(Ecore_Evas *ee, Eina_Bool on); void _ecore_evas_wl_common_maximized_set(Ecore_Evas *ee, Eina_Bool on); void _ecore_evas_wl_common_fullscreen_set(Ecore_Evas *ee, Eina_Bool on); void _ecore_evas_wl_common_ignore_events_set(Ecore_Evas *ee, int ignore); +void _ecore_evas_wl_common_focus_skip_set(Ecore_Evas *ee, Eina_Bool on); int _ecore_evas_wl_common_pre_render(Ecore_Evas *ee); /* int _ecore_evas_wl_common_render_updates(Ecore_Evas *ee); */ void _ecore_evas_wl_common_post_render(Ecore_Evas *ee); diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index 3736746352..d0dc191972 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c @@ -72,7 +72,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func = NULL, // urgent set NULL, // modal set NULL, // demand attention set - NULL, // focus skip set + _ecore_evas_wl_common_focus_skip_set, NULL, //_ecore_evas_wl_common_render, _ecore_evas_wl_common_screen_geometry_get, _ecore_evas_wl_common_screen_dpi_get, |