diff options
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 266a5869..65c7e1ec 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -70,6 +70,14 @@ static void set_position(struct sway_view *view, double ox, double oy) { | |||
70 | view->width, view->height); | 70 | view->width, view->height); |
71 | } | 71 | } |
72 | 72 | ||
73 | static void set_activated(struct sway_view *view, bool activated) { | ||
74 | if (!assert_xwayland(view)) { | ||
75 | return; | ||
76 | } | ||
77 | struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface; | ||
78 | wlr_xwayland_surface_activate(surface, activated); | ||
79 | } | ||
80 | |||
73 | static void handle_commit(struct wl_listener *listener, void *data) { | 81 | static void handle_commit(struct wl_listener *listener, void *data) { |
74 | struct sway_xwayland_surface *sway_surface = | 82 | struct sway_xwayland_surface *sway_surface = |
75 | wl_container_of(listener, sway_surface, commit); | 83 | wl_container_of(listener, sway_surface, commit); |
@@ -133,6 +141,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { | |||
133 | sway_view->iface.get_prop = get_prop; | 141 | sway_view->iface.get_prop = get_prop; |
134 | sway_view->iface.set_size = set_size; | 142 | sway_view->iface.set_size = set_size; |
135 | sway_view->iface.set_position = set_position; | 143 | sway_view->iface.set_position = set_position; |
144 | sway_view->iface.set_activated = set_activated; | ||
136 | sway_view->wlr_xwayland_surface = xsurface; | 145 | sway_view->wlr_xwayland_surface = xsurface; |
137 | sway_view->sway_xwayland_surface = sway_surface; | 146 | sway_view->sway_xwayland_surface = sway_surface; |
138 | // TODO remove from the tree when the surface goes away (unmapped) | 147 | // TODO remove from the tree when the surface goes away (unmapped) |