aboutsummaryrefslogtreecommitdiff
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-07-06 16:22:13 +0100
committerGitHub <noreply@github.com>2018-07-06 16:22:13 +0100
commitb3c55dd909b070625c9bfcebcb89cb8463e2ffc9 (patch)
tree714db24403e159b89cf5eaa59ddbd6cccd033947 /sway/input/cursor.c
parent7ef08ffbe6dc9a0b35cd9cad0b689136e3515886 (diff)
parentb8ee88344a5e2869fd3ce04762eda305dc5bf62e (diff)
Merge branch 'master' into leaks
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 944e35aa..a2f11557 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -255,14 +255,12 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
wlr_layer_surface_from_wlr_surface(surface);
if (layer->current.keyboard_interactive) {
seat_set_focus_layer(cursor->seat, layer);
- return;
}
- }
- // Avoid moving keyboard focus from a surface that accepts it to one
- // that does not unless the change would move us to a new workspace.
- //
- // This prevents, for example, losing focus when clicking on swaybar.
- if (surface && cont && cont->type != C_VIEW) {
+ } else if (surface && cont && cont->type != C_VIEW) {
+ // Avoid moving keyboard focus from a surface that accepts it to one
+ // that does not unless the change would move us to a new workspace.
+ //
+ // This prevents, for example, losing focus when clicking on swaybar.
struct sway_container *new_ws = cont;
if (new_ws && new_ws->type != C_WORKSPACE) {
new_ws = container_parent(new_ws, C_WORKSPACE);