diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-03-10 18:43:22 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-11 10:57:16 -0400 |
commit | 80343587cc605eefc62a9f132e0528cfd47caabf (patch) | |
tree | 12660de42971093da69ec29db83566705686807a | |
parent | 2c0b65f575dcd94450dfd1bc7b39de38b3f8411d (diff) | |
download | sway-80343587cc605eefc62a9f132e0528cfd47caabf.zip sway-80343587cc605eefc62a9f132e0528cfd47caabf.tar.gz sway-80343587cc605eefc62a9f132e0528cfd47caabf.tar.bz2 |
fullscreen: init floating on disable without size
If a container gets mapped as fullscreen and set to floating by
criteria, the size and location are never set for the floating
container. This adds a check in container_fullscreen_disable for a
width or height of 0 and calls container_init_floating
-rw-r--r-- | sway/tree/container.c | 7 |
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"); |