diff options
-rw-r--r-- | include/container.h | 5 | ||||
-rw-r--r-- | sway/container.c | 8 |
2 files changed, 2 insertions, 11 deletions
diff --git a/include/container.h b/include/container.h index ae57d1e3..d1905720 100644 --- a/include/container.h +++ b/include/container.h | |||
@@ -252,11 +252,6 @@ bool swayc_is_parent_of(swayc_t *parent, swayc_t *child); | |||
252 | bool swayc_is_child_of(swayc_t *child, swayc_t *parent); | 252 | bool swayc_is_child_of(swayc_t *child, swayc_t *parent); |
253 | 253 | ||
254 | /** | 254 | /** |
255 | * Returns true if view is stacked or tabbed. | ||
256 | */ | ||
257 | bool swayc_is_tabbed_stacked(swayc_t *view); | ||
258 | |||
259 | /** | ||
260 | * Returns the top most tabbed or stacked parent container. Returns NULL if | 255 | * Returns the top most tabbed or stacked parent container. Returns NULL if |
261 | * view is not in a tabbed/stacked layout. | 256 | * view is not in a tabbed/stacked layout. |
262 | */ | 257 | */ |
diff --git a/sway/container.c b/sway/container.c index d54dfd96..b49b32ee 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -725,7 +725,8 @@ void update_visibility_output(swayc_t *container, wlc_handle output) { | |||
725 | swayc_t *parent = container->parent; | 725 | swayc_t *parent = container->parent; |
726 | container->visible = parent->visible; | 726 | container->visible = parent->visible; |
727 | // special cases where visibility depends on focus | 727 | // special cases where visibility depends on focus |
728 | if (parent->type == C_OUTPUT || swayc_is_tabbed_stacked(container)) { | 728 | if (parent->type == C_OUTPUT || parent->layout == L_TABBED || |
729 | parent->layout == L_STACKED) { | ||
729 | container->visible = parent->focused == container && parent->visible; | 730 | container->visible = parent->focused == container && parent->visible; |
730 | } | 731 | } |
731 | // Set visibility and output for view | 732 | // Set visibility and output for view |
@@ -813,11 +814,6 @@ void close_views(swayc_t *container) { | |||
813 | container_map(container, close_view, NULL); | 814 | container_map(container, close_view, NULL); |
814 | } | 815 | } |
815 | 816 | ||
816 | bool swayc_is_tabbed_stacked(swayc_t *view) { | ||
817 | return (view->parent->layout == L_TABBED | ||
818 | || view->parent->layout == L_STACKED); | ||
819 | } | ||
820 | |||
821 | swayc_t *swayc_tabbed_stacked_parent(swayc_t *view) { | 817 | swayc_t *swayc_tabbed_stacked_parent(swayc_t *view) { |
822 | swayc_t *parent = NULL; | 818 | swayc_t *parent = NULL; |
823 | if (!ASSERT_NONNULL(view)) { | 819 | if (!ASSERT_NONNULL(view)) { |