From f45eab30fc72056cb41d63afa7063e4000e02123 Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Fri, 12 Jun 2015 17:35:02 +0900 Subject: [PATCH] Support lower request for wayland surface Change-Id: I3160bd396d24cf9775f6e4b66ae3b09d884a4585 Signed-off-by: MinJeong Kim --- src/e_mod_wl.c | 31 +++++++++++++++++++++++++++++++ src/e_tizen_policy_server_protocol.c | 10 ++++++---- src/e_tizen_policy_server_protocol.h | 7 +++++++ 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/e_mod_wl.c b/src/e_mod_wl.c index f3dcbc4..b071681 100644 --- a/src/e_mod_wl.c +++ b/src/e_mod_wl.c @@ -122,6 +122,36 @@ _e_tizen_policy_cb_activate(struct wl_client *client, } static void +_e_tizen_policy_cb_lower(struct wl_client *client, + struct wl_resource *policy, + struct wl_resource *surface_resource) +{ + E_Pixmap *ep; + E_Client *ec, *below = NULL; + + ep = wl_resource_get_user_data(surface_resource); + EINA_SAFETY_ON_NULL_RETURN(ep); + + ec = e_pixmap_client_get(ep); + EINA_SAFETY_ON_NULL_RETURN(ec); + EINA_SAFETY_ON_NULL_RETURN(ec->frame); + + below = ec; + while ((below = e_client_below_get(below))) + { + if ((e_client_util_ignored_get(below)) || + (below->iconic)) continue; + + break; + } + + evas_object_lower(ec->frame); + + if ((!below) || (!ec->focused)) return; + evas_object_focus_set(below->frame, 1); +} + +static void _e_tizen_policy_cb_position_set(struct wl_client *client, struct wl_resource *policy, struct wl_resource *surface_resource, @@ -207,6 +237,7 @@ static const struct tizen_policy_interface _e_tizen_policy_interface = { _e_tizen_policy_cb_visibility_get, _e_tizen_policy_cb_activate, + _e_tizen_policy_cb_lower, _e_tizen_policy_cb_position_set, _e_tizen_policy_cb_focus_skip_set, _e_tizen_policy_cb_focus_skip_unset, diff --git a/src/e_tizen_policy_server_protocol.c b/src/e_tizen_policy_server_protocol.c index b85438f..70c3b47 100644 --- a/src/e_tizen_policy_server_protocol.c +++ b/src/e_tizen_policy_server_protocol.c @@ -11,6 +11,7 @@ static const struct wl_interface *types[] = { &wl_surface_interface, &wl_surface_interface, &wl_surface_interface, + &wl_surface_interface, NULL, NULL, &wl_surface_interface, @@ -20,14 +21,15 @@ static const struct wl_interface *types[] = { 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 }, - { "focus_skip_unset", "o", types + 8 }, + { "lower", "o", types + 4 }, + { "position_set", "oii", types + 5 }, + { "focus_skip_set", "o", types + 8 }, + { "focus_skip_unset", "o", types + 9 }, }; WL_EXPORT const struct wl_interface tizen_policy_interface = { "tizen_policy", 1, - 5, tizen_policy_requests, + 6, tizen_policy_requests, 0, NULL, }; diff --git a/src/e_tizen_policy_server_protocol.h b/src/e_tizen_policy_server_protocol.h index 1aa79dc..4328ec2 100644 --- a/src/e_tizen_policy_server_protocol.h +++ b/src/e_tizen_policy_server_protocol.h @@ -38,6 +38,13 @@ struct tizen_policy_interface { struct wl_resource *resource, struct wl_resource *surface); /** + * lower - (none) + * @surface: surface object + */ + void (*lower)(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *surface); + /** * position_set - (none) * @surface: surface object * @x: (none) -- 2.7.4