diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2020-10-25 14:20:11 -0700 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2020-12-20 00:58:42 -0500 |
commit | ece6a1d408456ade74c88dee7d4b9e0491f0bdaf (patch) | |
tree | 09f5a40a02347c927a91ab66da6c794cfd787c97 /sway/desktop | |
parent | b4850876dc609830575531fd6e0ca696c956ae94 (diff) |
Change workspace_layout to match i3 behavior
In i3, the workspace_layout command does not affect the
workspace layout. Instead, new workspace level containers
are wrapped in the desired layout and the workspace layout
always defaults to the output orientation.
Diffstat (limited to 'sway/desktop')
-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) 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(); |