sway

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

commit 32193c7e4def7c0ba9cf8a7fcff02b1840d2b279
parent 98ed05225e06618533fa0439fdc83463cb9f1d2e
Author: Ryan Dwyer <RyanDwyer@users.noreply.github.com>
Date:   Fri, 17 Aug 2018 10:04:03 +1000

Merge pull request #2465 from DonnieWest/master

Default to the previous workspace if the current one has no focused windows
Diffstat:
Msway/tree/workspace.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c @@ -258,7 +258,8 @@ struct sway_container *workspace_by_name(const char *name) { struct sway_container *current_workspace = NULL, *current_output = NULL; struct sway_container *focus = seat_get_focus(seat); if (focus) { - current_workspace = container_parent(focus, C_WORKSPACE); + current_workspace = focus->type == C_WORKSPACE ? + focus : container_parent(focus, C_WORKSPACE); current_output = container_parent(focus, C_OUTPUT); }