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/tree | |
parent | 5192f74be132a563e30b240415b385e67cbacadb (diff) | |
parent | f6e218a64371b02afdf6b7812a52d70b13635ef3 (diff) | |
download | sway-456b91600d73edb3187c170eb6720b1c3212351c.tar.xz |
Merge pull request #2637 from RyanDwyer/fix-tabbed-workspace-shenanigans
Make seat_get_active_child ignore floating children
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 4 | ||||
-rw-r--r-- | sway/tree/view.c | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index f906449a..47687744 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -220,7 +220,7 @@ static struct sway_container *container_at_tabbed(struct sway_node *parent, } // Surfaces - struct sway_node *current = seat_get_active_child(seat, parent); + struct sway_node *current = seat_get_active_tiling_child(seat, parent); return current ? tiling_container_at(current, lx, ly, surface, sx, sy) : NULL; } @@ -248,7 +248,7 @@ static struct sway_container *container_at_stacked(struct sway_node *parent, } // Surfaces - struct sway_node *current = seat_get_active_child(seat, parent); + struct sway_node *current = seat_get_active_tiling_child(seat, parent); return current ? tiling_container_at(current, lx, ly, surface, sx, sy) : NULL; } diff --git a/sway/tree/view.c b/sway/tree/view.c index 78f85de2..e4e1c161 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1001,17 +1001,17 @@ bool view_is_visible(struct sway_view *view) { bool is_sticky = container_is_floating(floater) && floater->is_sticky; // Check view isn't in a tabbed or stacked container on an inactive tab struct sway_seat *seat = input_manager_current_seat(input_manager); - struct sway_container *container = view->container; - while (container) { - enum sway_container_layout layout = container_parent_layout(container); + struct sway_container *con = view->container; + while (con) { + enum sway_container_layout layout = container_parent_layout(con); if (layout == L_TABBED || layout == L_STACKED) { - struct sway_node *parent = container->parent ? - &container->parent->node : &container->workspace->node; - if (seat_get_active_child(seat, parent) != &container->node) { + struct sway_node *parent = con->parent ? + &con->parent->node : &con->workspace->node; + if (seat_get_active_tiling_child(seat, parent) != &con->node) { return false; } } - container = container->parent; + con = con->parent; } // Check view isn't hidden by another fullscreen view if (workspace->fullscreen && |