diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-06 04:56:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-06 04:56:59 -0700 |
commit | ddbf43779429426fc2e89cfe1da7f390042cdbcc (patch) | |
tree | e85d6b19730e401a1ed3d0e1e160622f3bfb8577 | |
parent | Merge pull request #2185 from swaywm/update-wlroots-1076 (diff) | |
parent | Fix pointer button events for layer surfaces (diff) | |
download | sway-ddbf43779429426fc2e89cfe1da7f390042cdbcc.tar.gz sway-ddbf43779429426fc2e89cfe1da7f390042cdbcc.tar.zst sway-ddbf43779429426fc2e89cfe1da7f390042cdbcc.zip |
Merge pull request #2219 from RedSoxFan/fix-2111
Send pointer button events for keyboard-interactive layer surfaces
-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); |