diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-17 09:53:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-17 09:53:28 -0400 |
commit | db4b4935b38b778398170d083a693f82831f1936 (patch) | |
tree | 0daac94b9a155da39c644a98035a31fcbb47caa8 /sway/commands | |
parent | 754bbd03c0948cb91a65960a371c7e07c55818af (diff) | |
parent | 3a888163a03e8fb6fbe91bfe8e2fe4f3d2f03cec (diff) | |
download | sway-db4b4935b38b778398170d083a693f82831f1936.tar.xz |
Merge pull request #2472 from RyanDwyer/refactor-seat-get-focus
Refactor seat_get_focus functions
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/focus.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 76d3f1dc..135a2908 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c @@ -46,14 +46,13 @@ static struct cmd_results *focus_mode(struct sway_container *con, struct sway_container *new_focus = NULL; if (floating) { - new_focus = seat_get_focus_inactive(seat, ws->sway_workspace->floating); + new_focus = seat_get_focus_inactive_floating(seat, ws); } else { new_focus = seat_get_focus_inactive_tiling(seat, ws); } - if (!new_focus) { - new_focus = ws; + if (new_focus) { + seat_set_focus(seat, new_focus); } - seat_set_focus(seat, new_focus); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } |