diff options
author | Chengyu Zheng <chengyu.zheng@polimi.it> | 2018-01-10 17:13:38 +0100 |
---|---|---|
committer | Chengyu Zheng <chengyu.zheng@polimi.it> | 2018-01-10 17:30:48 +0100 |
commit | 89188cf2b5818a81f0b6139068ef99245e19cc88 (patch) | |
tree | b1045959d4de1ce4f9aeafb3c34a7f3d960ea1e6 | |
parent | Merge pull request #1561 from pvsr/0.15 (diff) | |
download | sway-89188cf2b5818a81f0b6139068ef99245e19cc88.tar.gz sway-89188cf2b5818a81f0b6139068ef99245e19cc88.tar.zst sway-89188cf2b5818a81f0b6139068ef99245e19cc88.zip |
Fix out of focus when using mouse to change workspace
by preventing focus to C_OUTPUT when WLC_BUTTON_STATE_RELEASED event occurs.
-rw-r--r-- | sway/focus.c | 12 |
1 files 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) { | |||
162 | } | 162 | } |
163 | if (c->type == C_VIEW) { | 163 | if (c->type == C_VIEW) { |
164 | wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true); | 164 | wlc_view_set_state(c->handle, WLC_BIT_ACTIVATED, true); |
165 | } | 165 | if (!desktop_shell.is_locked) { |
166 | if (!desktop_shell.is_locked) { | 166 | // If the system is locked, we do everything _but_ actually setting |
167 | // If the system is locked, we do everything _but_ actually setting | 167 | // focus. This includes making our internals think that this view is |
168 | // focus. This includes making our internals think that this view is | 168 | // focused. |
169 | // focused. | 169 | wlc_view_focus(c->handle); |
170 | wlc_view_focus(c->handle); | 170 | } |
171 | } | 171 | } |
172 | if (c->parent->layout != L_TABBED && c->parent->layout != L_STACKED) { | 172 | if (c->parent->layout != L_TABBED && c->parent->layout != L_STACKED) { |
173 | update_container_border(c); | 173 | update_container_border(c); |