diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2018-10-02 13:08:23 +0200 |
---|---|---|
committer | Ilia Bozhinov <ammen99@gmail.com> | 2018-12-08 14:09:51 +0100 |
commit | 8cce2d75a9a9241ca5083d99e3ef827238b8f471 (patch) | |
tree | 7ea626498d6c645a5afa4329bf5acc65c0ef5df9 /rootston/xwayland.c | |
parent | f387a840d89f8040fdea57a1e9e159d79fa0e7ff (diff) |
rootston: add support for wlr_foreign_toplevel_management_v1
Diffstat (limited to 'rootston/xwayland.c')
-rw-r--r-- | rootston/xwayland.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/rootston/xwayland.c b/rootston/xwayland.c index f887ed40..f3f962e8 100644 --- a/rootston/xwayland.c +++ b/rootston/xwayland.c @@ -203,11 +203,17 @@ static void handle_request_fullscreen(struct wl_listener *listener, static void handle_set_title(struct wl_listener *listener, void *data) { struct roots_xwayland_surface *roots_surface = wl_container_of(listener, roots_surface, set_title); + + view_set_title(roots_surface->view, + roots_surface->view->xwayland_surface->title); } static void handle_set_class(struct wl_listener *listener, void *data) { struct roots_xwayland_surface *roots_surface = - wl_container_of(listener, roots_surface, set_title); + wl_container_of(listener, roots_surface, set_class); + + view_set_app_id(roots_surface->view, + roots_surface->view->xwayland_surface->class); } static void handle_surface_commit(struct wl_listener *listener, void *data) { @@ -262,6 +268,11 @@ static void handle_map(struct wl_listener *listener, void *data) { } view_setup(view); + + wlr_foreign_toplevel_handle_v1_set_title(view->toplevel_handle, + view->xwayland_surface->title ?: "none"); + wlr_foreign_toplevel_handle_v1_set_app_id(view->toplevel_handle, + view->xwayland_surface->class ?: "none"); } else { view_initial_focus(view); } @@ -273,7 +284,6 @@ static void handle_unmap(struct wl_listener *listener, void *data) { struct roots_view *view = roots_surface->view; wl_list_remove(&roots_surface->surface_commit.link); - view_unmap(view); } |