Fix out of focus when using mouse to change workspace

by preventing focus to C_OUTPUT when WLC_BUTTON_STATE_RELEASED event occurs.
This commit is contained in:
Chengyu Zheng 2018-01-10 17:13:38 +01:00
parent 3e3014df4d
commit 89188cf2b5

View file

@ -162,12 +162,12 @@ bool set_focused_container(swayc_t *c) {
} }
if (c->type == C_VIEW) { if (c->type == C_VIEW) {
wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true); wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true);
} if (!desktop_shell.is_locked) {
if (!desktop_shell.is_locked) { // If the system is locked, we do everything _but_ actually setting
// If the system is locked, we do everything _but_ actually setting // focus. This includes making our internals think that this view is
// focus. This includes making our internals think that this view is // focused.
// focused. wlc_view_focus(c->handle);
wlc_view_focus(c->handle); }
} }
if (c->parent->layout != L_TABBED && c->parent->layout != L_STACKED) { if (c->parent->layout != L_TABBED && c->parent->layout != L_STACKED) {
update_container_border(c); update_container_border(c);