aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index a4d9687d..7603d3ca 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -80,6 +80,13 @@ static void set_activated(struct sway_view *view, bool activated) {
80 wlr_xwayland_surface_activate(surface, activated); 80 wlr_xwayland_surface_activate(surface, activated);
81} 81}
82 82
83static void close(struct sway_view *view) {
84 if (!assert_xwayland(view)) {
85 return;
86 }
87 wlr_xwayland_surface_close(view->wlr_xwayland_surface);
88}
89
83static void handle_commit(struct wl_listener *listener, void *data) { 90static void handle_commit(struct wl_listener *listener, void *data) {
84 struct sway_xwayland_surface *sway_surface = 91 struct sway_xwayland_surface *sway_surface =
85 wl_container_of(listener, sway_surface, commit); 92 wl_container_of(listener, sway_surface, commit);
@@ -192,6 +199,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
192 sway_view->iface.set_size = set_size; 199 sway_view->iface.set_size = set_size;
193 sway_view->iface.set_position = set_position; 200 sway_view->iface.set_position = set_position;
194 sway_view->iface.set_activated = set_activated; 201 sway_view->iface.set_activated = set_activated;
202 sway_view->iface.close = close;
195 sway_view->wlr_xwayland_surface = xsurface; 203 sway_view->wlr_xwayland_surface = xsurface;
196 sway_view->sway_xwayland_surface = sway_surface; 204 sway_view->sway_xwayland_surface = sway_surface;
197 sway_view->surface = xsurface->surface; 205 sway_view->surface = xsurface->surface;