diff options
Diffstat (limited to 'sway/desktop/wl_shell.c')
-rw-r--r-- | sway/desktop/wl_shell.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c index e34f5160..0cde6583 100644 --- a/sway/desktop/wl_shell.c +++ b/sway/desktop/wl_shell.c | |||
@@ -51,6 +51,14 @@ static void set_activated(struct sway_view *view, bool activated) { | |||
51 | // no way to activate wl_shell | 51 | // no way to activate wl_shell |
52 | } | 52 | } |
53 | 53 | ||
54 | static void close(struct sway_view *view) { | ||
55 | if (!assert_wl_shell(view)) { | ||
56 | return; | ||
57 | } | ||
58 | |||
59 | wl_client_destroy(view->wlr_wl_shell_surface->client); | ||
60 | } | ||
61 | |||
54 | static void handle_commit(struct wl_listener *listener, void *data) { | 62 | static void handle_commit(struct wl_listener *listener, void *data) { |
55 | struct sway_wl_shell_surface *sway_surface = | 63 | struct sway_wl_shell_surface *sway_surface = |
56 | wl_container_of(listener, sway_surface, commit); | 64 | wl_container_of(listener, sway_surface, commit); |
@@ -103,6 +111,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) { | |||
103 | sway_view->iface.set_size = set_size; | 111 | sway_view->iface.set_size = set_size; |
104 | sway_view->iface.set_position = set_position; | 112 | sway_view->iface.set_position = set_position; |
105 | sway_view->iface.set_activated = set_activated; | 113 | sway_view->iface.set_activated = set_activated; |
114 | sway_view->iface.close = close; | ||
106 | sway_view->wlr_wl_shell_surface = shell_surface; | 115 | sway_view->wlr_wl_shell_surface = shell_surface; |
107 | sway_view->sway_wl_shell_surface = sway_surface; | 116 | sway_view->sway_wl_shell_surface = sway_surface; |
108 | sway_view->surface = shell_surface->surface; | 117 | sway_view->surface = shell_surface->surface; |