mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 11:21:28 +00:00
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.
This commit is contained in:
parent
215787e8b2
commit
197d0ab82f
|
@ -267,6 +267,11 @@ static struct cmd_results *focus_mode(struct sway_workspace *ws,
|
||||||
new_focus = seat_get_focus_inactive_tiling(seat, ws);
|
new_focus = seat_get_focus_inactive_tiling(seat, ws);
|
||||||
}
|
}
|
||||||
if (new_focus) {
|
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);
|
seat_set_focus_container(seat, new_focus);
|
||||||
|
|
||||||
// If we're on the floating layer and the floating container area
|
// If we're on the floating layer and the floating container area
|
||||||
|
|
Loading…
Reference in a new issue