summaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-07-05 23:01:35 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-07-05 23:01:35 -0400
commitc833ae64bc1d1561cc71e68dcd2d2bd909aac538 (patch)
treee85d6b19730e401a1ed3d0e1e160622f3bfb8577 /sway/input/cursor.c
parentMerge pull request #2185 from swaywm/update-wlroots-1076 (diff)
downloadsway-c833ae64bc1d1561cc71e68dcd2d2bd909aac538.tar.gz
sway-c833ae64bc1d1561cc71e68dcd2d2bd909aac538.tar.zst
sway-c833ae64bc1d1561cc71e68dcd2d2bd909aac538.zip
Fix pointer button events for layer surfaces
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,
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);