aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/container.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index a614219..93cff7f 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -984,6 +984,13 @@ void container_fullscreen_disable(struct sway_container *con) {
root->fullscreen_global = NULL;
}
+ // If the container was mapped as fullscreen and set as floating by
+ // criteria, it needs to be reinitialized as floating to get the proper
+ // size and location
+ if (container_is_floating(con) && (con->width == 0 || con->height == 0)) {
+ container_init_floating(con);
+ }
+
con->fullscreen_mode = FULLSCREEN_NONE;
container_end_mouse_operation(con);
ipc_event_window(con, "fullscreen_mode");