diff options
-rw-r--r-- | sway/commands/focus.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 30cfa1c5..e48e48aa 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -54,7 +54,7 @@ static struct sway_node *get_node_in_output_direction( | |||
54 | } else { | 54 | } else { |
55 | container = seat_get_focus_inactive_tiling(seat, ws); | 55 | container = seat_get_focus_inactive_tiling(seat, ws); |
56 | } | 56 | } |
57 | return &container->node; | 57 | break; |
58 | case MOVE_RIGHT: | 58 | case MOVE_RIGHT: |
59 | if (ws->layout == L_HORIZ || ws->layout == L_TABBED) { | 59 | if (ws->layout == L_HORIZ || ws->layout == L_TABBED) { |
60 | // get most left child of new output | 60 | // get most left child of new output |
@@ -62,7 +62,7 @@ static struct sway_node *get_node_in_output_direction( | |||
62 | } else { | 62 | } else { |
63 | container = seat_get_focus_inactive_tiling(seat, ws); | 63 | container = seat_get_focus_inactive_tiling(seat, ws); |
64 | } | 64 | } |
65 | return &container->node; | 65 | break; |
66 | case MOVE_UP: | 66 | case MOVE_UP: |
67 | if (ws->layout == L_VERT || ws->layout == L_STACKED) { | 67 | if (ws->layout == L_VERT || ws->layout == L_STACKED) { |
68 | // get most bottom child of new output | 68 | // get most bottom child of new output |
@@ -70,7 +70,7 @@ static struct sway_node *get_node_in_output_direction( | |||
70 | } else { | 70 | } else { |
71 | container = seat_get_focus_inactive_tiling(seat, ws); | 71 | container = seat_get_focus_inactive_tiling(seat, ws); |
72 | } | 72 | } |
73 | return &container->node; | 73 | break; |
74 | case MOVE_DOWN: { | 74 | case MOVE_DOWN: { |
75 | if (ws->layout == L_VERT || ws->layout == L_STACKED) { | 75 | if (ws->layout == L_VERT || ws->layout == L_STACKED) { |
76 | // get most top child of new output | 76 | // get most top child of new output |
@@ -78,13 +78,18 @@ static struct sway_node *get_node_in_output_direction( | |||
78 | } else { | 78 | } else { |
79 | container = seat_get_focus_inactive_tiling(seat, ws); | 79 | container = seat_get_focus_inactive_tiling(seat, ws); |
80 | } | 80 | } |
81 | return &container->node; | 81 | break; |
82 | } | 82 | } |
83 | default: | 83 | default: |
84 | break; | 84 | break; |
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | if (container) { | ||
89 | container = seat_get_focus_inactive_view(seat, &container->node); | ||
90 | return &container->node; | ||
91 | } | ||
92 | |||
88 | return &ws->node; | 93 | return &ws->node; |
89 | } | 94 | } |
90 | 95 | ||