diff options
author | William Wold <wm@wmww.sh> | 2018-09-09 22:47:58 -0700 |
---|---|---|
committer | William Wold <wm@wmww.sh> | 2018-09-10 10:18:12 -0700 |
commit | e787a1581cc399ca7d953c9cd4d868499f5733a3 (patch) | |
tree | 3f14ab74cc6684867cdf41de76e0b833ad86783f /sway/tree/container.c | |
parent | Merge pull request #2613 from apreiml/fix_no_last_focus_fail (diff) | |
download | sway-e787a1581cc399ca7d953c9cd4d868499f5733a3.tar.gz sway-e787a1581cc399ca7d953c9cd4d868499f5733a3.tar.zst sway-e787a1581cc399ca7d953c9cd4d868499f5733a3.zip |
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.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
218 | 218 | ||
219 | // Surfaces | 219 | // Surfaces |
220 | struct sway_node *current = seat_get_active_child(seat, parent); | 220 | struct sway_node *current = seat_get_active_child(seat, parent); |
221 | return tiling_container_at(current, lx, ly, surface, sx, sy); | 221 | return current ? tiling_container_at(current, lx, ly, surface, sx, sy) : NULL; |
222 | } | 222 | } |
223 | 223 | ||
224 | /** | 224 | /** |