From 20f6daf2bc40bbd9f8d2271a7840fd0bc4d2f658 Mon Sep 17 00:00:00 2001 From: Manuel Bachmann Date: 2014年7月16日 03:29:50 +0200 Subject: [PATCH] shell: support a new "xdg_shell_unset_minimized()" function Clients can now unminimize themselves. They will be shown in the foreground when doing so. Change-Id: I5b42f2f179d8efeb198bfc5a58a9119b0cc25253 Signed-off-by: Manuel Bachmann --- desktop-shell/shell.c | 16 +++++++++++++++- protocol/xdg-shell.xml | 8 +++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 4eef849..9b44c62 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -3515,6 +3515,19 @@ xdg_surface_set_minimized(struct wl_client *client, set_minimized(shsurf->surface, 1); } +static void +xdg_surface_unset_minimized(struct wl_client *client, + struct wl_resource *resource) +{ + struct shell_surface *shsurf = wl_resource_get_user_data(resource); + + if (shsurf->type != SHELL_SURFACE_TOPLEVEL) + return; + + /* apply compositor's own unminimization logic (unhide) */ + set_minimized(shsurf->surface, 0); +} + static const struct xdg_surface_interface xdg_surface_implementation = { xdg_surface_destroy, xdg_surface_set_transient_for, @@ -3526,7 +3539,8 @@ static const struct xdg_surface_interface xdg_surface_implementation = { xdg_surface_set_output, xdg_surface_request_change_state, xdg_surface_ack_change_state, - xdg_surface_set_minimized + xdg_surface_set_minimized, + xdg_surface_unset_minimized }; static void diff --git a/protocol/xdg-shell.xml b/protocol/xdg-shell.xml index 79a2831..741d458 100644 --- a/protocol/xdg-shell.xml +++ b/protocol/xdg-shell.xml @@ -357,11 +357,17 @@ - + Minimize the surface. + + + Unminimize the surface. + + + The activated_set event is sent when this surface has been -- 1.8.1.4

AltStyle によって変換されたページ (->オリジナル) /