aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-05-21 17:21:01 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-05-21 17:21:01 -0400
commit8bbf78fdd430a7e315356ebeda36adbf48b8953d (patch)
tree1ec441c2e87ea0c0ecfe39aad0dfd87cbe2e3acc /sway/input/cursor.c
parentMerge pull request #2016 from RedSoxFan/fix-tab-smart-borders (diff)
downloadsway-8bbf78fdd430a7e315356ebeda36adbf48b8953d.tar.gz
sway-8bbf78fdd430a7e315356ebeda36adbf48b8953d.tar.zst
sway-8bbf78fdd430a7e315356ebeda36adbf48b8953d.zip
Fix focus follows mouse with no focus
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index e0b987d2..9a0b4f01 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -147,10 +147,10 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
147 struct sway_container *c = container_at_coords(cursor->seat, 147 struct sway_container *c = container_at_coords(cursor->seat,
148 cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy); 148 cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
149 if (c && config->focus_follows_mouse && allow_refocusing) { 149 if (c && config->focus_follows_mouse && allow_refocusing) {
150 if (c->type == C_WORKSPACE) { 150 struct sway_container *focus = seat_get_focus(cursor->seat);
151 if (focus && c->type == C_WORKSPACE) {
151 // Only follow the mouse if it would move to a new output 152 // Only follow the mouse if it would move to a new output
152 // Otherwise we'll focus the workspace, which is probably wrong 153 // Otherwise we'll focus the workspace, which is probably wrong
153 struct sway_container *focus = seat_get_focus(cursor->seat);
154 if (focus->type != C_OUTPUT) { 154 if (focus->type != C_OUTPUT) {
155 focus = container_parent(focus, C_OUTPUT); 155 focus = container_parent(focus, C_OUTPUT);
156 } 156 }