sway views: add helpers to get view and layer from wlr_surface

This commit is contained in:
Dominique Martinet 2018-06-30 14:00:24 +09:00
parent d8c61c9763
commit 9ea4cc13a0
8 changed files with 73 additions and 0 deletions

View file

@ -307,6 +307,11 @@ static void handle_unmap(struct wl_listener *listener, void *data) {
unmap(sway_layer);
}
struct sway_layer_surface *layer_from_wlr_layer_surface(
struct wlr_layer_surface *layer_surface) {
return layer_surface->data;
}
void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
struct wlr_layer_surface *layer_surface = data;
struct sway_server *server =