summaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 2d714acd..c5c8459e 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -210,14 +210,13 @@ void seat_for_each_node(struct sway_seat *seat,
210 210
211struct sway_container *seat_get_focus_inactive_view(struct sway_seat *seat, 211struct sway_container *seat_get_focus_inactive_view(struct sway_seat *seat,
212 struct sway_node *ancestor) { 212 struct sway_node *ancestor) {
213 if (ancestor->type == N_CONTAINER && ancestor->sway_container->view) { 213 if (node_is_view(ancestor)) {
214 return ancestor->sway_container; 214 return ancestor->sway_container;
215 } 215 }
216 struct sway_seat_node *current; 216 struct sway_seat_node *current;
217 wl_list_for_each(current, &seat->focus_stack, link) { 217 wl_list_for_each(current, &seat->focus_stack, link) {
218 struct sway_node *node = current->node; 218 struct sway_node *node = current->node;
219 if (node->type == N_CONTAINER && node->sway_container->view && 219 if (node_is_view(node) && node_has_ancestor(node, ancestor)) {
220 node_has_ancestor(node, ancestor)) {
221 return node->sway_container; 220 return node->sway_container;
222 } 221 }
223 } 222 }