diff options
-rw-r--r-- | sway/container.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c index 15975064..21538ab4 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -853,12 +853,12 @@ swayc_t *swayc_tabbed_stacked_parent(swayc_t *view) { | |||
853 | if (!ASSERT_NONNULL(view)) { | 853 | if (!ASSERT_NONNULL(view)) { |
854 | return NULL; | 854 | return NULL; |
855 | } | 855 | } |
856 | do { | 856 | while (view->type != C_WORKSPACE && view->parent) { |
857 | view = view->parent; | 857 | view = view->parent; |
858 | if (view->layout == L_TABBED || view->layout == L_STACKED) { | 858 | if (view->layout == L_TABBED || view->layout == L_STACKED) { |
859 | parent = view; | 859 | parent = view; |
860 | } | 860 | } |
861 | } while (view && view->type != C_WORKSPACE); | 861 | } |
862 | 862 | ||
863 | return parent; | 863 | return parent; |
864 | } | 864 | } |