diff options
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 0b637822..ae6db454 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -137,6 +137,21 @@ void container_move_to(struct sway_container *container, | |||
137 | || container_has_anscestor(container, destination)) { | 137 | || container_has_anscestor(container, destination)) { |
138 | return; | 138 | return; |
139 | } | 139 | } |
140 | |||
141 | if (container->sway_view->is_fullscreen) { | ||
142 | struct sway_container *old_workspace = container; | ||
143 | if (old_workspace->type != C_WORKSPACE) { | ||
144 | old_workspace = container_parent(old_workspace, C_WORKSPACE); | ||
145 | } | ||
146 | struct sway_container *new_workspace = destination; | ||
147 | if (new_workspace->type != C_WORKSPACE) { | ||
148 | new_workspace = container_parent(new_workspace, C_WORKSPACE); | ||
149 | } | ||
150 | if (old_workspace != new_workspace) { | ||
151 | view_set_fullscreen(container->sway_view, false); | ||
152 | } | ||
153 | } | ||
154 | |||
140 | struct sway_container *old_parent = container_remove_child(container); | 155 | struct sway_container *old_parent = container_remove_child(container); |
141 | container->width = container->height = 0; | 156 | container->width = container->height = 0; |
142 | struct sway_container *new_parent; | 157 | struct sway_container *new_parent; |
@@ -557,6 +572,9 @@ void arrange_windows(struct sway_container *container, | |||
557 | return; | 572 | return; |
558 | case C_WORKSPACE: | 573 | case C_WORKSPACE: |
559 | { | 574 | { |
575 | if (container->fullscreen) { | ||
576 | return; | ||
577 | } | ||
560 | struct sway_container *output = | 578 | struct sway_container *output = |
561 | container_parent(container, C_OUTPUT); | 579 | container_parent(container, C_OUTPUT); |
562 | struct wlr_box *area = &output->sway_output->usable_area; | 580 | struct wlr_box *area = &output->sway_output->usable_area; |