sway

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

commit b3f7801fca21dc792020a407050ae993615c293d
parent 23601a8771f6e98e04bb4bfb9dd75ed399a20717
Author: Ian Fan <ianfan0@gmail.com>
Date:   Sun, 12 Aug 2018 15:40:24 +0100

commands: prevent focusing mode with no containers

Explicitly fail when trying to focus tiling/floating when there are no tiling/floating containers.

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

diff --git a/sway/commands/focus.c b/sway/commands/focus.c @@ -52,6 +52,10 @@ static struct cmd_results *focus_mode(struct sway_container *con, } if (new_focus) { seat_set_focus(seat, new_focus); + } else { + return cmd_results_new(CMD_FAILURE, "focus", + "Failed to find a %s container in workspace", + floating ? "floating" : "tiling"); } return cmd_results_new(CMD_SUCCESS, NULL, NULL); }