aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-07-02 13:29:25 +0100
committerGitHub <noreply@github.com>2018-07-02 13:29:25 +0100
commit8cc26130a66f533a5cbb8e4833a536dd8798f833 (patch)
treee6556155ef90d573f4ae854aaf83a6e57091bf2e /sway
parentc969923aba29797c8ae6f7a7fe0a298a2f7c52f9 (diff)
parent1e4807efa0647b2d856a4c8e9b23aff35625d1d8 (diff)
Merge pull request #2194 from RyanDwyer/fix-incorrect-render
Don't return pending children in seat_get_active_current_child
Diffstat (limited to 'sway')
-rw-r--r--sway/input/seat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 2c2087da..a934d4a8 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -832,12 +832,12 @@ struct sway_container *seat_get_active_child(struct sway_seat *seat,
struct sway_container *seat_get_active_current_child(struct sway_seat *seat,
struct sway_container *container) {
- struct sway_container *child = seat_get_active_child(seat, container);
- if (child) {
- return child;
- }
- if (container->current.children->length == 1) {
- return container->current.children->items[0];
+ struct sway_seat_container *current = NULL;
+ wl_list_for_each(current, &seat->focus_stack, link) {
+ if (current->container->current.parent == container &&
+ current->container->current.layout != L_FLOATING) {
+ return current->container;
+ }
}
return NULL;
}