From eb82a500c80a942ba4ff8cbb6750ad5d6d6f98c4 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Fri, 4 Mar 2016 22:53:23 +0100 Subject: [PATCH] Remove focus when switching to empty workspace Fix #504 --- sway/focus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sway/focus.c b/sway/focus.c index c2ded212..7f96eda7 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -139,6 +139,11 @@ bool set_focused_container(swayc_t *c) { wlc_view_focus(p->handle); } } + } else if (p->type == C_WORKSPACE) { + // remove previous focus if view_focus is unlocked + if (!locked_view_focus) { + wlc_view_focus(0); + } } if (active_ws != workspace) {