aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/xdg_shell.c11
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)
return;
}
+ struct sway_container *container = view->container;
if (e->fullscreen && e->output && e->output->data) {
struct sway_output *output = e->output->data;
struct sway_workspace *ws = output_get_active_workspace(output);
- if (ws && !container_is_scratchpad_hidden(view->container)) {
- if (container_is_floating(view->container)) {
- workspace_add_floating(ws, view->container);
+ if (ws && !container_is_scratchpad_hidden(container)) {
+ if (container_is_floating(container)) {
+ workspace_add_floating(ws, container);
} else {
- workspace_add_tiling(ws, view->container);
+ container = workspace_add_tiling(ws, container);
}
}
}
- container_set_fullscreen(view->container, e->fullscreen);
+ container_set_fullscreen(container, e->fullscreen);
arrange_root();
transaction_commit_dirty();