diff options
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 10faf91d..94a30239 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -154,6 +154,8 @@ static const char *get_string_prop(struct sway_view *view, enum sway_view_prop p | |||
154 | return view->wlr_xwayland_surface->class; | 154 | return view->wlr_xwayland_surface->class; |
155 | case VIEW_PROP_INSTANCE: | 155 | case VIEW_PROP_INSTANCE: |
156 | return view->wlr_xwayland_surface->instance; | 156 | return view->wlr_xwayland_surface->instance; |
157 | case VIEW_PROP_WINDOW_ROLE: | ||
158 | return view->wlr_xwayland_surface->role; | ||
157 | default: | 159 | default: |
158 | return NULL; | 160 | return NULL; |
159 | } | 161 | } |
@@ -340,6 +342,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
340 | wl_list_remove(&xwayland_view->request_activate.link); | 342 | wl_list_remove(&xwayland_view->request_activate.link); |
341 | wl_list_remove(&xwayland_view->set_title.link); | 343 | wl_list_remove(&xwayland_view->set_title.link); |
342 | wl_list_remove(&xwayland_view->set_class.link); | 344 | wl_list_remove(&xwayland_view->set_class.link); |
345 | wl_list_remove(&xwayland_view->set_role.link); | ||
343 | wl_list_remove(&xwayland_view->set_window_type.link); | 346 | wl_list_remove(&xwayland_view->set_window_type.link); |
344 | wl_list_remove(&xwayland_view->set_hints.link); | 347 | wl_list_remove(&xwayland_view->set_hints.link); |
345 | wl_list_remove(&xwayland_view->map.link); | 348 | wl_list_remove(&xwayland_view->map.link); |
@@ -500,6 +503,17 @@ static void handle_set_class(struct wl_listener *listener, void *data) { | |||
500 | view_execute_criteria(view); | 503 | view_execute_criteria(view); |
501 | } | 504 | } |
502 | 505 | ||
506 | static void handle_set_role(struct wl_listener *listener, void *data) { | ||
507 | struct sway_xwayland_view *xwayland_view = | ||
508 | wl_container_of(listener, xwayland_view, set_role); | ||
509 | struct sway_view *view = &xwayland_view->view; | ||
510 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | ||
511 | if (!xsurface->mapped) { | ||
512 | return; | ||
513 | } | ||
514 | view_execute_criteria(view); | ||
515 | } | ||
516 | |||
503 | static void handle_set_window_type(struct wl_listener *listener, void *data) { | 517 | static void handle_set_window_type(struct wl_listener *listener, void *data) { |
504 | struct sway_xwayland_view *xwayland_view = | 518 | struct sway_xwayland_view *xwayland_view = |
505 | wl_container_of(listener, xwayland_view, set_window_type); | 519 | wl_container_of(listener, xwayland_view, set_window_type); |
@@ -587,6 +601,9 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { | |||
587 | wl_signal_add(&xsurface->events.set_class, &xwayland_view->set_class); | 601 | wl_signal_add(&xsurface->events.set_class, &xwayland_view->set_class); |
588 | xwayland_view->set_class.notify = handle_set_class; | 602 | xwayland_view->set_class.notify = handle_set_class; |
589 | 603 | ||
604 | wl_signal_add(&xsurface->events.set_role, &xwayland_view->set_role); | ||
605 | xwayland_view->set_role.notify = handle_set_role; | ||
606 | |||
590 | wl_signal_add(&xsurface->events.set_window_type, | 607 | wl_signal_add(&xsurface->events.set_window_type, |
591 | &xwayland_view->set_window_type); | 608 | &xwayland_view->set_window_type); |
592 | xwayland_view->set_window_type.notify = handle_set_window_type; | 609 | xwayland_view->set_window_type.notify = handle_set_window_type; |