diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-16 10:22:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-16 10:22:01 -0400 |
commit | 456b91600d73edb3187c170eb6720b1c3212351c (patch) | |
tree | 318401a7a3c0e8f778d45e4ea26f5517e05191fa /sway/input | |
parent | 5192f74be132a563e30b240415b385e67cbacadb (diff) | |
parent | f6e218a64371b02afdf6b7812a52d70b13635ef3 (diff) |
Merge pull request #2637 from RyanDwyer/fix-tabbed-workspace-shenanigans
Make seat_get_active_child ignore floating children
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index ab5047b2..49fe46ba 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -880,7 +880,7 @@ struct sway_container *seat_get_focus_inactive_floating(struct sway_seat *seat, return NULL; } -struct sway_node *seat_get_active_child(struct sway_seat *seat, +struct sway_node *seat_get_active_tiling_child(struct sway_seat *seat, struct sway_node *parent) { if (node_is_view(parent)) { return parent; @@ -888,9 +888,17 @@ struct sway_node *seat_get_active_child(struct sway_seat *seat, struct sway_seat_node *current; wl_list_for_each(current, &seat->focus_stack, link) { struct sway_node *node = current->node; - if (node_get_parent(node) == parent) { - return node; + if (node_get_parent(node) != parent) { + continue; } + if (parent->type == N_WORKSPACE) { + // Only consider tiling children + struct sway_workspace *ws = parent->sway_workspace; + if (list_find(ws->tiling, node->sway_container) == -1) { + continue; + } + } + return node; } return NULL; } |