sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit d358aab8d9dd6121533326423759394ca804a05a
parent a6544f5a64e5d0899555795915d9a05f7bb09f9c
Author: Kenny Levinsen <kl@kl.wtf>
Date:   Wed, 24 Feb 2021 21:11:55 +0100

container: Limit tiled focus to container geometry

container_at would maintain the current focus as long as a position was
over one of the container view's surfaces. If an oversized surface was
being clipped, this lead to weird focus behavior.

Instead, use view_container_at for this test, which intersects the
container box before looking at surfaces.

Diffstat:
Msway/tree/container.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sway/tree/container.c b/sway/tree/container.c @@ -395,7 +395,7 @@ struct sway_container *container_at(struct sway_workspace *workspace, } // Tiling (focused) if (focus && focus->view && !is_floating) { - if ((c = surface_at_view(focus, lx, ly, surface, sx, sy))) { + if ((c = view_container_at(&focus->node, lx, ly, surface, sx, sy))) { return c; } }