aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar siikamiika <siikamiika@users.noreply.github.com>2021-10-09 16:40:24 +0300
committerLibravatar Simon Ser <contact@emersion.fr>2021-10-10 09:35:15 +0200
commitf4db502d4470f2ed87b63ee4b73d1b98506a715c (patch)
treeb661320192bfbced60f9204b18d9d342e5ec401c /sway/input/seat.c
parentImprove built-in touchscreen detection (diff)
downloadsway-f4db502d4470f2ed87b63ee4b73d1b98506a715c.tar.gz
sway-f4db502d4470f2ed87b63ee4b73d1b98506a715c.tar.zst
sway-f4db502d4470f2ed87b63ee4b73d1b98506a715c.zip
use node_is_view
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 }