mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Destroy empty workspaces when moving away
This commit is contained in:
parent
2d46050281
commit
01af343912
5 changed files with 104 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue