diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-06 09:26:28 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-06 09:26:49 -0400 |
commit | b08f7e5183d25ce0d4ae89796893a6d25d4a1b93 (patch) | |
tree | 70b9e3f290fcbdb203a0d2c8911b4da83d326085 /sway/input/seat.c | |
parent | Merge pull request #1754 from emersion/fix-output-enter (diff) | |
download | sway-b08f7e5183d25ce0d4ae89796893a6d25d4a1b93.tar.gz sway-b08f7e5183d25ce0d4ae89796893a6d25d4a1b93.tar.zst sway-b08f7e5183d25ce0d4ae89796893a6d25d4a1b93.zip |
Fix deletion of still-visible workspaces on unfocus
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index e3df6955..ad3584a0 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <wlr/types/wlr_output_layout.h> | 6 | #include <wlr/types/wlr_output_layout.h> |
7 | #include <wlr/types/wlr_xcursor_manager.h> | 7 | #include <wlr/types/wlr_xcursor_manager.h> |
8 | #include "sway/tree/container.h" | 8 | #include "sway/tree/container.h" |
9 | #include "sway/tree/workspace.h" | ||
9 | #include "sway/input/seat.h" | 10 | #include "sway/input/seat.h" |
10 | #include "sway/input/cursor.h" | 11 | #include "sway/input/cursor.h" |
11 | #include "sway/input/input-manager.h" | 12 | #include "sway/input/input-manager.h" |
@@ -398,7 +399,8 @@ void seat_set_focus_warp(struct sway_seat *seat, | |||
398 | } | 399 | } |
399 | if (last_ws) { | 400 | if (last_ws) { |
400 | ipc_event_workspace(last_ws, container, "focus"); | 401 | ipc_event_workspace(last_ws, container, "focus"); |
401 | if (last_ws->children->length == 0) { | 402 | if (!workspace_is_visible(last_ws) |
403 | && last_ws->children->length == 0) { | ||
402 | container_destroy(last_ws); | 404 | container_destroy(last_ws); |
403 | } | 405 | } |
404 | } | 406 | } |