aboutsummaryrefslogtreecommitdiff
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-06 09:32:38 -0400
committerDrew DeVault <sir@cmpwn.com>2018-04-06 09:32:51 -0400
commitcca420b2f83da0af97de82677b7027710a0fd8d7 (patch)
tree16e0d8845cf14fb40a910322d039464c16bb8365 /sway/input/cursor.c
parentb08f7e5183d25ce0d4ae89796893a6d25d4a1b93 (diff)
Fix focus_follows_mouse issues
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index b83bc9fe..6db615b1 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -116,7 +116,16 @@ static struct sway_container *container_at_cursor(struct sway_cursor *cursor,
return ws;
}
- return NULL;
+ c = seat_get_focus_inactive(cursor->seat, output->swayc);
+ if (c) {
+ return c;
+ }
+ if (!c && output->swayc->children->length) {
+ c = output->swayc->children->items[0];
+ return c;
+ }
+
+ return output->swayc;
}
static void cursor_send_pointer_motion(struct sway_cursor *cursor,