mirror of
https://github.com/swaywm/sway.git
synced 2026-04-24 06:46:22 -04:00
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.
This commit is contained in:
parent
b4850876dc
commit
ece6a1d408
8 changed files with 51 additions and 35 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue