diff options
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index da3a1cdd..5b40d903 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -289,6 +289,11 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data) arrange_and_commit(ws); } +struct sway_view *view_from_wlr_xdg_surface( + struct wlr_xdg_surface *xdg_surface) { + return xdg_surface->data; +} + void handle_xdg_shell_surface(struct wl_listener *listener, void *data) { struct sway_server *server = wl_container_of(listener, server, xdg_shell_surface); @@ -327,4 +332,6 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data) { xdg_shell_view->request_fullscreen.notify = handle_request_fullscreen; wl_signal_add(&xdg_surface->toplevel->events.request_fullscreen, &xdg_shell_view->request_fullscreen); + + xdg_surface->data = xdg_shell_view; } |