aboutsummaryrefslogtreecommitdiff
path: root/sway/focus.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-07-27 22:14:20 -0400
committerGitHub <noreply@github.com>2016-07-27 22:14:20 -0400
commit6d2b455727f7e3df1fc7241a39694bd843a92ed1 (patch)
treeab2c6db115963d22715f454501ecee5c33a997fb /sway/focus.c
parent70e73d71db3b5234f1748eb89ad32a50e0ca7ac1 (diff)
parent8a03f138bf2d14a3e5d864df22563e72a19b85d1 (diff)
Merge pull request #790 from acrisci/bug/switch-focus-workspace-output
bugfix: set focus to workspace of an output
Diffstat (limited to 'sway/focus.c')
-rw-r--r--sway/focus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c
index d2a1e0d6..c7737a1d 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -67,9 +67,11 @@ bool move_focus(enum movement_direction direction) {
swayc_t *new_view = get_swayc_in_direction(old_view, direction);
if (!new_view) {
return false;
- } else if (new_view->type == C_ROOT || new_view->type == C_OUTPUT) {
+ } else if (new_view->type == C_ROOT) {
sway_log(L_DEBUG, "Not setting focus above the workspace level");
return false;
+ } else if (new_view->type == C_OUTPUT) {
+ return set_focused_container(swayc_active_workspace_for(new_view));
} else if (direction == MOVE_PARENT) {
return set_focused_container(new_view);
} else if (config->mouse_warping) {