aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
authorLibravatar Ronan Pigott <rpigott@berkeley.edu>2020-10-25 14:20:11 -0700
committerLibravatar Tudor Brindus <me@tbrindus.ca>2020-12-20 00:58:42 -0500
commitece6a1d408456ade74c88dee7d4b9e0491f0bdaf (patch)
tree09f5a40a02347c927a91ab66da6c794cfd787c97 /sway/desktop
parentRevert "commands/move: maintain workspace_layout when moving" (diff)
downloadsway-ece6a1d408456ade74c88dee7d4b9e0491f0bdaf.tar.gz
sway-ece6a1d408456ade74c88dee7d4b9e0491f0bdaf.tar.zst
sway-ece6a1d408456ade74c88dee7d4b9e0491f0bdaf.zip
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.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)
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();