diff options
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index df5f6698..fcc8164f 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -199,6 +199,14 @@ static void set_activated(struct sway_view *view, bool activated) { | |||
199 | wlr_xwayland_surface_activate(surface, activated); | 199 | wlr_xwayland_surface_activate(surface, activated); |
200 | } | 200 | } |
201 | 201 | ||
202 | static void set_tiled(struct sway_view *view, bool tiled) { | ||
203 | if (xwayland_view_from_view(view) == NULL) { | ||
204 | return; | ||
205 | } | ||
206 | struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface; | ||
207 | wlr_xwayland_surface_set_maximized(surface, tiled); | ||
208 | } | ||
209 | |||
202 | static void set_fullscreen(struct sway_view *view, bool fullscreen) { | 210 | static void set_fullscreen(struct sway_view *view, bool fullscreen) { |
203 | if (xwayland_view_from_view(view) == NULL) { | 211 | if (xwayland_view_from_view(view) == NULL) { |
204 | return; | 212 | return; |
@@ -265,6 +273,7 @@ static const struct sway_view_impl view_impl = { | |||
265 | .get_int_prop = get_int_prop, | 273 | .get_int_prop = get_int_prop, |
266 | .configure = configure, | 274 | .configure = configure, |
267 | .set_activated = set_activated, | 275 | .set_activated = set_activated, |
276 | .set_tiled = set_tiled, | ||
268 | .set_fullscreen = set_fullscreen, | 277 | .set_fullscreen = set_fullscreen, |
269 | .wants_floating = wants_floating, | 278 | .wants_floating = wants_floating, |
270 | .close = _close, | 279 | .close = _close, |
@@ -309,7 +318,6 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
309 | xwayland_view->commit.notify = handle_commit; | 318 | xwayland_view->commit.notify = handle_commit; |
310 | 319 | ||
311 | // Put it back into the tree | 320 | // Put it back into the tree |
312 | wlr_xwayland_surface_set_maximized(xsurface, true); | ||
313 | view_map(view, xsurface->surface); | 321 | view_map(view, xsurface->surface); |
314 | 322 | ||
315 | if (xsurface->fullscreen) { | 323 | if (xsurface->fullscreen) { |