From c09a1d7825e6165ee6de56ce694821d1eee89e8e Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Wed, 10 Jan 2018 17:13:38 +0100 Subject: Fix out of focus when using mouse to change workspace by preventing focus to C_OUTPUT when WLC_BUTTON_STATE_RELEASED event occurs. --- sway/focus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sway/focus.c b/sway/focus.c index e9b032f8..751de1f1 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -162,12 +162,12 @@ bool set_focused_container(swayc_t *c) { } if (c->type == C_VIEW) { wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true); - } - if (!desktop_shell.is_locked) { - // If the system is locked, we do everything _but_ actually setting - // focus. This includes making our internals think that this view is - // focused. - wlc_view_focus(c->handle); + if (!desktop_shell.is_locked) { + // If the system is locked, we do everything _but_ actually setting + // focus. This includes making our internals think that this view is + // focused. + wlc_view_focus(c->handle); + } } if (c->parent->layout != L_TABBED && c->parent->layout != L_STACKED) { update_container_border(c); -- cgit v1.2.3