sway

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

commit 197d0ab82f64ea9a96786e55e375c930389aa85b
parent 215787e8b28d4e52d97bdcadd4b64305c7a62ac5
Author: siikamiika <siikamiika@users.noreply.github.com>
Date:   Sun, 10 Oct 2021 01:57:48 +0300

commands/focus: focus view inside container

seat_get_focus_inactive_floating and seat_get_focus_inactive_tiling do
not always return a view, so get the previously focused view from the
container with seat_get_focus_inactive_view. This is the i3 behavior.

Diffstat:
Msway/commands/focus.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/sway/commands/focus.c b/sway/commands/focus.c @@ -267,6 +267,11 @@ static struct cmd_results *focus_mode(struct sway_workspace *ws, new_focus = seat_get_focus_inactive_tiling(seat, ws); } if (new_focus) { + struct sway_container *new_focus_view = + seat_get_focus_inactive_view(seat, &new_focus->node); + if (new_focus_view) { + new_focus = new_focus_view; + } seat_set_focus_container(seat, new_focus); // If we're on the floating layer and the floating container area