This commit is contained in:
Tudor Brindus 2021-01-28 15:47:08 +09:00 committed by GitHub
commit 9fb3a40b12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -1226,12 +1226,18 @@ void container_discover_outputs(struct sway_container *con) {
}
enum sway_container_layout container_parent_layout(struct sway_container *con) {
if (container_is_floating(con)) {
return L_NONE;
}
if (con->parent) {
return con->parent->layout;
}
if (con->workspace) {
return con->workspace->layout;
}
return L_NONE;
}

View file

@ -1278,8 +1278,7 @@ bool view_is_visible(struct sway_view *view) {
struct sway_container *con = view->container;
while (con) {
enum sway_container_layout layout = container_parent_layout(con);
if ((layout == L_TABBED || layout == L_STACKED)
&& !container_is_floating(con)) {
if (layout == L_TABBED || layout == L_STACKED) {
struct sway_node *parent = con->parent ?
&con->parent->node : &con->workspace->node;
if (seat_get_active_tiling_child(seat, parent) != &con->node) {