aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c18
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,
|| container_has_anscestor(container, destination)) {
return;
}
+
+ if (container->sway_view->is_fullscreen) {
+ struct sway_container *old_workspace = container;
+ if (old_workspace->type != C_WORKSPACE) {
+ old_workspace = container_parent(old_workspace, C_WORKSPACE);
+ }
+ struct sway_container *new_workspace = destination;
+ if (new_workspace->type != C_WORKSPACE) {
+ new_workspace = container_parent(new_workspace, C_WORKSPACE);
+ }
+ if (old_workspace != new_workspace) {
+ view_set_fullscreen(container->sway_view, false);
+ }
+ }
+
struct sway_container *old_parent = container_remove_child(container);
container->width = container->height = 0;
struct sway_container *new_parent;
@@ -557,6 +572,9 @@ void arrange_windows(struct sway_container *container,
return;
case C_WORKSPACE:
{
+ if (container->fullscreen) {
+ return;
+ }
struct sway_container *output =
container_parent(container, C_OUTPUT);
struct wlr_box *area = &output->sway_output->usable_area;