aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-30 10:31:21 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-30 10:47:19 -0400
commit01af34391267e91461a4ab7a1234dd58f45d2c93 (patch)
treeae5197dabda270035b383d45b5c113afab2ebfbd /sway/input/seat.c
parentFix crash when override redirect views close (diff)
downloadsway-01af34391267e91461a4ab7a1234dd58f45d2c93.tar.gz
sway-01af34391267e91461a4ab7a1234dd58f45d2c93.tar.zst
sway-01af34391267e91461a4ab7a1234dd58f45d2c93.zip
Destroy empty workspaces when moving away
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c4
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 @@
8#include "sway/input/keyboard.h" 8#include "sway/input/keyboard.h"
9#include "sway/ipc-server.h" 9#include "sway/ipc-server.h"
10#include "sway/output.h" 10#include "sway/output.h"
11#include "sway/tree/container.h"
11#include "sway/tree/view.h" 12#include "sway/tree/view.h"
12#include "log.h" 13#include "log.h"
13 14
@@ -331,6 +332,9 @@ void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *containe
331 if (last_ws) { 332 if (last_ws) {
332 wlr_log(L_DEBUG, "sending workspace event"); 333 wlr_log(L_DEBUG, "sending workspace event");
333 ipc_event_workspace(last_ws, container, "focus"); 334 ipc_event_workspace(last_ws, container, "focus");
335 if (last_ws->children->length == 0) {
336 container_workspace_destroy(last_ws);
337 }
334 } 338 }
335 } 339 }
336 340