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.
master
Kenny Levinsen 4 years ago committed by Simon Ser
parent a6544f5a64
commit d358aab8d9

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

Loading…
Cancel
Save