From: Duna Oh Date: Tue, 2 Jun 2015 04:04:50 +0000 (+0900) Subject: Implementation 'focus_skip_set' request for wl_surface X-Git-Tag: submit/tizen/20150603.021106~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5cfe089f7dbf172e61f3c5c42c880fd8f641d433;p=platform%2Fupstream%2Fefl.git Implementation 'focus_skip_set' request for wl_surface Change-Id: Ide885bcb2211d39a6b17459a5662026db185528f Signed-off-by: Duna Oh --- diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h index 3425199..dff3dfa 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 51d80a6..6656376 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 bf3f0d9..3308fec 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 884754e..9b18210 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 99adb03..845e469 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 f87a6bb..a5f772b 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 597c776..395a1e4 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 3736746..d0dc191 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,