aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 6dd7cf7d..3cd079f4 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -145,14 +145,14 @@ static struct sway_container *seat_get_focus_by_type(struct sway_seat *seat,
145 continue; 145 continue;
146 } 146 }
147 147
148 if (container_has_child(container, current->container)) { 148 if (container_has_ancestor(current->container, container)) {
149 if (only_tiling && 149 if (only_tiling &&
150 container_is_floating_or_child(current->container)) { 150 container_is_floating_or_child(current->container)) {
151 continue; 151 continue;
152 } 152 }
153 return current->container; 153 return current->container;
154 } 154 }
155 if (floating && container_has_child(floating, current->container)) { 155 if (floating && container_has_ancestor(current->container, floating)) {
156 return current->container; 156 return current->container;
157 } 157 }
158 } 158 }
@@ -190,7 +190,7 @@ static void handle_seat_container_destroy(struct wl_listener *listener,
190 190
191 bool set_focus = 191 bool set_focus =
192 focus != NULL && 192 focus != NULL &&
193 (focus == con || container_has_child(con, focus)) && 193 (focus == con || container_has_ancestor(focus, con)) &&
194 con->type != C_WORKSPACE; 194 con->type != C_WORKSPACE;
195 195
196 seat_container_destroy(seat_con); 196 seat_container_destroy(seat_con);