diff options
author | 2016-10-12 21:26:06 -0400 | |
---|---|---|
committer | 2016-10-12 21:26:06 -0400 | |
commit | 4cba91803eb8c3c3ab4ebf22e94510b43f7a907d (patch) | |
tree | 5f80bbe3775f0e405895ab973c62f8bbd8ea1bf8 /sway/handlers.c | |
parent | Merge pull request #952 from SirCmpwn/revert-948-floating-titlebar-click (diff) | |
download | sway-4cba91803eb8c3c3ab4ebf22e94510b43f7a907d.tar.gz sway-4cba91803eb8c3c3ab4ebf22e94510b43f7a907d.tar.zst sway-4cba91803eb8c3c3ab4ebf22e94510b43f7a907d.zip |
Revert "Fixes dealing with workspace_layout and related bugs [rfc]"
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 9a84182a..2235bc8b 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -398,6 +398,17 @@ static bool handle_view_created(wlc_handle handle) { | |||
398 | if (workspace && workspace->fullscreen) { | 398 | if (workspace && workspace->fullscreen) { |
399 | set_focused_container(workspace->fullscreen); | 399 | set_focused_container(workspace->fullscreen); |
400 | } | 400 | } |
401 | |||
402 | // if parent container is a workspace, newview its only child and | ||
403 | // layout is tabbed/stacked, add a container around newview | ||
404 | swayc_t *parent_container = newview->parent; | ||
405 | if (parent_container && parent_container->type == C_WORKSPACE && | ||
406 | parent_container->children && parent_container->children->length == 1 && | ||
407 | (parent_container->layout == L_TABBED || parent_container->layout == L_STACKED)) { | ||
408 | swayc_t *container = new_container(newview, parent_container->layout); | ||
409 | set_focused_container(newview); | ||
410 | arrange_windows(container, -1, -1); | ||
411 | } | ||
401 | } else { | 412 | } else { |
402 | swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT); | 413 | swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT); |
403 | wlc_handle *h = malloc(sizeof(wlc_handle)); | 414 | wlc_handle *h = malloc(sizeof(wlc_handle)); |