diff options
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index f02021e1..fdac6171 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -349,19 +349,20 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data) | |||
349 | return; | 349 | return; |
350 | } | 350 | } |
351 | 351 | ||
352 | struct sway_container *container = view->container; | ||
352 | if (e->fullscreen && e->output && e->output->data) { | 353 | if (e->fullscreen && e->output && e->output->data) { |
353 | struct sway_output *output = e->output->data; | 354 | struct sway_output *output = e->output->data; |
354 | struct sway_workspace *ws = output_get_active_workspace(output); | 355 | struct sway_workspace *ws = output_get_active_workspace(output); |
355 | if (ws && !container_is_scratchpad_hidden(view->container)) { | 356 | if (ws && !container_is_scratchpad_hidden(container)) { |
356 | if (container_is_floating(view->container)) { | 357 | if (container_is_floating(container)) { |
357 | workspace_add_floating(ws, view->container); | 358 | workspace_add_floating(ws, container); |
358 | } else { | 359 | } else { |
359 | workspace_add_tiling(ws, view->container); | 360 | container = workspace_add_tiling(ws, container); |
360 | } | 361 | } |
361 | } | 362 | } |
362 | } | 363 | } |
363 | 364 | ||
364 | container_set_fullscreen(view->container, e->fullscreen); | 365 | container_set_fullscreen(container, e->fullscreen); |
365 | 366 | ||
366 | arrange_root(); | 367 | arrange_root(); |
367 | transaction_commit_dirty(); | 368 | transaction_commit_dirty(); |