summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-09-06 14:59:01 +0200
committerFurkan Sahin <furkan-dev@proton.me>2018-09-06 14:59:01 +0200
commitfbc75b27d30b73f31eb0c682f79996fdd34d90ab (patch)
treefe5acdd42e4a8d4ac7b17cfbd09d52a7f8e7dcee
parent48689dc8d42fb5cd0e67a7f44db32619487fb41b (diff)
parent7ce0b06e3609d7c387d5d81d8c1d0ba1b53444bd (diff)
Merge pull request #2592 from RyanDwyer/fix-fullscreen-unmap-focus
Second attempt at restoring focus when closing a fullscreen view
-rw-r--r--sway/tree/container.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 50f284f4..cbbb1f56 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -84,6 +84,11 @@ void container_begin_destroy(struct sway_container *con) {
if (con->view) {
ipc_event_window(con, "close");
}
+ // The workspace must have the fullscreen pointer cleared so that the
+ // seat code can find an appropriate new focus.
+ if (con->is_fullscreen && con->workspace) {
+ con->workspace->fullscreen = NULL;
+ }
wl_signal_emit(&con->node.events.destroy, &con->node);
container_end_mouse_operation(con);