aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-11-05 12:39:44 -0500
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-11-05 12:39:44 -0500
commitc8c1ecaf258188266161832991fc52999eddbfc7 (patch)
treedb770f567e0f6ca7627c2afbbcc8549ced846419 /sway/commands/focus.c
parentMerge pull request #3075 from swaywm/revert-3073-swayidle_workaround (diff)
downloadsway-c8c1ecaf258188266161832991fc52999eddbfc7.tar.gz
sway-c8c1ecaf258188266161832991fc52999eddbfc7.tar.zst
sway-c8c1ecaf258188266161832991fc52999eddbfc7.zip
Fix focus_wrapping yes
It appears that the focus code that handles `focus_wrapping yes` was removed during the conversion to type safety. This re-implements the focus code for when `focus_wrapping` is set to `yes` (default). Neither the `no` or `force` options appear to be effected and should be working.
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index cef92144..f6338c55 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -156,6 +156,14 @@ static struct sway_node *node_get_in_direction(struct sway_container *container,
156 if (new_output) { 156 if (new_output) {
157 return get_node_in_output_direction(new_output, dir); 157 return get_node_in_output_direction(new_output, dir);
158 } 158 }
159
160 // If there is a wrap candidate, return its focus inactive view
161 if (wrap_candidate) {
162 struct sway_container *wrap_inactive = seat_get_focus_inactive_view(
163 seat, &wrap_candidate->node);
164 return &wrap_inactive->node;
165 }
166
159 return NULL; 167 return NULL;
160} 168}
161 169