diff options
-rw-r--r-- | sway/tree/container.c | 3 | ||||
-rw-r--r-- | sway/tree/workspace.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index ff10c1ab..21a0cd76 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -1063,7 +1063,8 @@ list_t *container_get_current_siblings(struct sway_container *container) { | |||
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | void container_handle_fullscreen_reparent(struct sway_container *con) { | 1065 | void container_handle_fullscreen_reparent(struct sway_container *con) { |
1066 | if (!con->is_fullscreen || con->workspace->fullscreen == con) { | 1066 | if (!con->is_fullscreen || !con->workspace || |
1067 | con->workspace->fullscreen == con) { | ||
1067 | return; | 1068 | return; |
1068 | } | 1069 | } |
1069 | if (con->workspace->fullscreen) { | 1070 | if (con->workspace->fullscreen) { |
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index d4b57a0f..18746430 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c | |||
@@ -557,6 +557,7 @@ struct sway_container *workspace_find_container(struct sway_workspace *ws, | |||
557 | } | 557 | } |
558 | 558 | ||
559 | struct sway_container *workspace_wrap_children(struct sway_workspace *ws) { | 559 | struct sway_container *workspace_wrap_children(struct sway_workspace *ws) { |
560 | struct sway_container *fs = ws->fullscreen; | ||
560 | struct sway_container *middle = container_create(NULL); | 561 | struct sway_container *middle = container_create(NULL); |
561 | middle->layout = ws->layout; | 562 | middle->layout = ws->layout; |
562 | while (ws->tiling->length) { | 563 | while (ws->tiling->length) { |
@@ -565,6 +566,7 @@ struct sway_container *workspace_wrap_children(struct sway_workspace *ws) { | |||
565 | container_add_child(middle, child); | 566 | container_add_child(middle, child); |
566 | } | 567 | } |
567 | workspace_add_tiling(ws, middle); | 568 | workspace_add_tiling(ws, middle); |
569 | ws->fullscreen = fs; | ||
568 | return middle; | 570 | return middle; |
569 | } | 571 | } |
570 | 572 | ||