diff options
author | 2021-02-24 21:11:55 +0100 | |
---|---|---|
committer | 2021-03-01 16:14:10 +0100 | |
commit | d358aab8d9dd6121533326423759394ca804a05a (patch) | |
tree | 96c64c5bea9273f94f8a1f19e98540eeefc56f92 | |
parent | render: Clip surfaces to container bounds (diff) | |
download | sway-d358aab8d9dd6121533326423759394ca804a05a.tar.gz sway-d358aab8d9dd6121533326423759394ca804a05a.tar.zst sway-d358aab8d9dd6121533326423759394ca804a05a.zip |
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.
-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 e22c5961..1b7b9dd0 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -395,7 +395,7 @@ struct sway_container *container_at(struct sway_workspace *workspace, | |||
395 | } | 395 | } |
396 | // Tiling (focused) | 396 | // Tiling (focused) |
397 | if (focus && focus->view && !is_floating) { | 397 | if (focus && focus->view && !is_floating) { |
398 | if ((c = surface_at_view(focus, lx, ly, surface, sx, sy))) { | 398 | if ((c = view_container_at(&focus->node, lx, ly, surface, sx, sy))) { |
399 | return c; | 399 | return c; |
400 | } | 400 | } |
401 | } | 401 | } |