diff options
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index ea5dcd16..9e914f14 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -339,6 +339,18 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data) | |||
339 | return; | 339 | return; |
340 | } | 340 | } |
341 | 341 | ||
342 | if (e->fullscreen && e->output && e->output->data) { | ||
343 | struct sway_output *output = e->output->data; | ||
344 | struct sway_workspace *ws = output_get_active_workspace(output); | ||
345 | if (ws && !container_is_scratchpad_hidden(view->container)) { | ||
346 | if (container_is_floating(view->container)) { | ||
347 | workspace_add_floating(ws, view->container); | ||
348 | } else { | ||
349 | workspace_add_tiling(ws, view->container); | ||
350 | } | ||
351 | } | ||
352 | } | ||
353 | |||
342 | container_set_fullscreen(view->container, e->fullscreen); | 354 | container_set_fullscreen(view->container, e->fullscreen); |
343 | 355 | ||
344 | arrange_root(); | 356 | arrange_root(); |
@@ -417,7 +429,9 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
417 | } | 429 | } |
418 | 430 | ||
419 | view_map(view, view->wlr_xdg_surface->surface, | 431 | view_map(view, view->wlr_xdg_surface->surface, |
420 | xdg_surface->toplevel->client_pending.fullscreen, csd); | 432 | xdg_surface->toplevel->client_pending.fullscreen, |
433 | xdg_surface->toplevel->client_pending.fullscreen_output, | ||
434 | csd); | ||
421 | 435 | ||
422 | transaction_commit_dirty(); | 436 | transaction_commit_dirty(); |
423 | 437 | ||