diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 10:31:21 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-30 10:47:19 -0400 |
commit | 01af34391267e91461a4ab7a1234dd58f45d2c93 (patch) | |
tree | ae5197dabda270035b383d45b5c113afab2ebfbd /sway/input | |
parent | 2d460502812093b47f43295cf21636198e44edbb (diff) |
Destroy empty workspaces when moving away
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 7cf0dd08..ae536264 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -8,6 +8,7 @@ #include "sway/input/keyboard.h" #include "sway/ipc-server.h" #include "sway/output.h" +#include "sway/tree/container.h" #include "sway/tree/view.h" #include "log.h" @@ -331,6 +332,9 @@ void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *containe if (last_ws) { wlr_log(L_DEBUG, "sending workspace event"); ipc_event_workspace(last_ws, container, "focus"); + if (last_ws->children->length == 0) { + container_workspace_destroy(last_ws); + } } } |