aboutsummaryrefslogtreecommitdiff
path: root/rootston/xdg_shell_v6.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-07 13:04:04 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-07 13:04:04 -0400
commit4f848000af6bdf57a6e861e69a53677f23133202 (patch)
tree341aca21d2cfd2b24021e83c4f85fa68b9f4618a /rootston/xdg_shell_v6.c
parent4680943e749bfd441d31c988faa50f2b1ae043ad (diff)
parent321c26c2a3c77ddba52e1a6194669328e473fdb4 (diff)
Merge branch 'master' into feature/xdg-popup
Diffstat (limited to 'rootston/xdg_shell_v6.c')
-rw-r--r--rootston/xdg_shell_v6.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c
index ff0dd090..c0124d60 100644
--- a/rootston/xdg_shell_v6.c
+++ b/rootston/xdg_shell_v6.c
@@ -33,6 +33,14 @@ static void resize(struct roots_view *view, uint32_t width, uint32_t height) {
}
}
+static void close(struct roots_view *view) {
+ assert(view->type == ROOTS_XDG_SHELL_V6_VIEW);
+ struct wlr_xdg_surface_v6 *surf = view->xdg_surface_v6;
+ if (surf->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL) {
+ wlr_xdg_toplevel_v6_send_close(surf);
+ }
+}
+
static void handle_request_move(struct wl_listener *listener, void *data) {
struct roots_xdg_surface_v6 *roots_xdg_surface =
wl_container_of(listener, roots_xdg_surface, request_move);
@@ -114,6 +122,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
view->get_size = get_size;
view->activate = activate;
view->resize = resize;
+ view->close = close;
view->desktop = desktop;
roots_surface->view = view;
list_add(desktop->views, view);