diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2019-12-12 00:07:48 -0700 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-12-12 06:51:13 -0500 |
commit | f645f8efd688104cdeac01cd940b32a8ff978571 (patch) | |
tree | 5ed6d506c080010654383c48703b37c3088b2809 | |
parent | layer-shell: unfocus output-less layer on unmap (diff) | |
download | sway-f645f8efd688104cdeac01cd940b32a8ff978571.tar.gz sway-f645f8efd688104cdeac01cd940b32a8ff978571.tar.zst sway-f645f8efd688104cdeac01cd940b32a8ff978571.zip |
Fix lingering workspace with scratchpad show
Showing a window in the scratchpad can move a visible scratchpad window
from another workspace to the current one. If the scratchpad window was
the last visible container in that workspace, the old workspace should
be destroyed.
-rw-r--r-- | sway/tree/root.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/tree/root.c b/sway/tree/root.c index 55d78487..6759b6cf 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c | |||
@@ -131,6 +131,7 @@ void root_scratchpad_show(struct sway_container *con) { | |||
131 | // Show the container | 131 | // Show the container |
132 | if (old_ws) { | 132 | if (old_ws) { |
133 | container_detach(con); | 133 | container_detach(con); |
134 | workspace_consider_destroy(old_ws); | ||
134 | } | 135 | } |
135 | workspace_add_floating(new_ws, con); | 136 | workspace_add_floating(new_ws, con); |
136 | 137 | ||