From cca420b2f83da0af97de82677b7027710a0fd8d7 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 6 Apr 2018 09:32:38 -0400 Subject: Fix focus_follows_mouse issues --- sway/input/cursor.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3