diff options
-rw-r--r-- | sway/input/cursor.c | 12 |
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, | |||
255 | wlr_layer_surface_from_wlr_surface(surface); | 255 | wlr_layer_surface_from_wlr_surface(surface); |
256 | if (layer->current.keyboard_interactive) { | 256 | if (layer->current.keyboard_interactive) { |
257 | seat_set_focus_layer(cursor->seat, layer); | 257 | seat_set_focus_layer(cursor->seat, layer); |
258 | return; | ||
259 | } | 258 | } |
260 | } | 259 | } else if (surface && cont && cont->type != C_VIEW) { |
261 | // Avoid moving keyboard focus from a surface that accepts it to one | 260 | // Avoid moving keyboard focus from a surface that accepts it to one |
262 | // that does not unless the change would move us to a new workspace. | 261 | // that does not unless the change would move us to a new workspace. |
263 | // | 262 | // |
264 | // This prevents, for example, losing focus when clicking on swaybar. | 263 | // This prevents, for example, losing focus when clicking on swaybar. |
265 | if (surface && cont && cont->type != C_VIEW) { | ||
266 | struct sway_container *new_ws = cont; | 264 | struct sway_container *new_ws = cont; |
267 | if (new_ws && new_ws->type != C_WORKSPACE) { | 265 | if (new_ws && new_ws->type != C_WORKSPACE) { |
268 | new_ws = container_parent(new_ws, C_WORKSPACE); | 266 | new_ws = container_parent(new_ws, C_WORKSPACE); |