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.
This commit is contained in:
William Wold 2018-09-09 22:47:58 -07:00
parent 024b9d85ea
commit e787a1581c
4 changed files with 13 additions and 1 deletions

View file

@ -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;
}
/**