From 2b4b85d9eedb6dfe00539be20d66780e4212c523 Mon Sep 17 00:00:00 2001 From: Duna Oh Date: Thu, 11 Jun 2015 15:18:41 +0900 Subject: [PATCH] implementation of 'transient_for_unset' protocol Signed-off-by: Duna Oh Change-Id: Ic5d704bcff153906478d5096f6970f421530cb67 --- src/modules/wl_desktop_shell/e_mod_main.c | 17 +++++++++++++++++ src/modules/wl_desktop_shell/tizen_transient_for.xml | 3 +++ .../wl_desktop_shell/tizen_transient_for_protocol.c | 3 ++- .../tizen_transient_for_server_protocol.h | 7 +++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index f4b8541..6613be6 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -1430,6 +1430,22 @@ _e_tz_transient_for_cb_set(struct wl_client *client, struct wl_resource *resourc EC_CHANGED(ec); } +static void +_e_tz_transient_for_cb_unset(struct wl_client *client, struct wl_resource *resource, uint32_t child_id) +{ + E_Client *ec; + + DBG("chid_id: %" PRIu32, child_id); + + ec = e_pixmap_find_client_by_res_id(child_id); + EINA_SAFETY_ON_NULL_RETURN(ec); + + _e_shell_surface_parent_set(ec, NULL); + tizen_transient_for_send_done(resource, child_id); + + EC_CHANGED(ec); +} + static const struct tizen_surface_extension_interface _e_tz_surf_ext_interface = { _e_tz_surf_ext_cb_tz_res_get, @@ -1438,6 +1454,7 @@ static const struct tizen_surface_extension_interface _e_tz_surf_ext_interface static const struct tizen_transient_for_interface _e_tz_transient_for_interface = { _e_tz_transient_for_cb_set, + _e_tz_transient_for_cb_unset, }; static const struct wl_shell_interface _e_shell_interface = diff --git a/src/modules/wl_desktop_shell/tizen_transient_for.xml b/src/modules/wl_desktop_shell/tizen_transient_for.xml index cc3c752..e18330b 100644 --- a/src/modules/wl_desktop_shell/tizen_transient_for.xml +++ b/src/modules/wl_desktop_shell/tizen_transient_for.xml @@ -4,6 +4,9 @@ + + + diff --git a/src/modules/wl_desktop_shell/tizen_transient_for_protocol.c b/src/modules/wl_desktop_shell/tizen_transient_for_protocol.c index ac60de6..5864df8 100644 --- a/src/modules/wl_desktop_shell/tizen_transient_for_protocol.c +++ b/src/modules/wl_desktop_shell/tizen_transient_for_protocol.c @@ -10,6 +10,7 @@ static const struct wl_interface *types[] = { static const struct wl_message tizen_transient_for_requests[] = { { "set", "uu", types + 0 }, + { "unset", "u", types + 0 }, }; static const struct wl_message tizen_transient_for_events[] = { @@ -18,7 +19,7 @@ static const struct wl_message tizen_transient_for_events[] = { WL_EXPORT const struct wl_interface tizen_transient_for_interface = { "tizen_transient_for", 1, - 1, tizen_transient_for_requests, + 2, tizen_transient_for_requests, 1, tizen_transient_for_events, }; diff --git a/src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h b/src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h index edbc14f..a1fb174 100644 --- a/src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h +++ b/src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h @@ -26,6 +26,13 @@ struct tizen_transient_for_interface { struct wl_resource *resource, uint32_t child_id, uint32_t parent_id); + /** + * unset - (none) + * @child_id: (none) + */ + void (*unset)(struct wl_client *client, + struct wl_resource *resource, + uint32_t child_id); }; #define TIZEN_TRANSIENT_FOR_DONE 0 -- 2.7.4