From e787a1581cc399ca7d953c9cd4d868499f5733a3 Mon Sep 17 00:00:00 2001 From: William Wold Date: Sun, 9 Sep 2018 22:47:58 -0700 Subject: Give windows pointer focus immediately when they are switched to Fixes #2401 (aka #2558) Previously, when switching windows, pointer focus was not changed until the pointer was moved. This makes the pointer enter happen immediately, without the side effects of other attempted fixes. --- sway/tree/container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/tree/container.c') diff --git a/sway/tree/container.c b/sway/tree/container.c index ccd79f0e..ebc60027 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -218,7 +218,7 @@ static struct sway_container *container_at_tabbed(struct sway_node *parent, // Surfaces struct sway_node *current = seat_get_active_child(seat, parent); - return tiling_container_at(current, lx, ly, surface, sx, sy); + return current ? tiling_container_at(current, lx, ly, surface, sx, sy) : NULL; } /** -- cgit v1.2.3-54-g00ecf