From 476dcc5bd9c7040fabb928dedc3d171db0cbd59b Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 3 Jun 2018 22:48:51 +1000 Subject: [PATCH] Handle empty tabbed/stacked containers when looking for popups --- sway/tree/container.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sway/tree/container.c b/sway/tree/container.c index fdeae2b56..37d6f8d39 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -681,10 +681,12 @@ static struct sway_container *popup_at_container(struct sway_container *parent, if (parent->layout == L_TABBED || parent->layout == L_STACKED) { struct sway_seat *seat = input_manager_current_seat(input_manager); struct sway_container *child = seat_get_active_child(seat, parent); - struct sway_container *c = - popup_at_container(child, lx, ly, surface, sx, sy); - if (c) { - return c; + if (child) { + struct sway_container *c = + popup_at_container(child, lx, ly, surface, sx, sy); + if (c) { + return c; + } } } else { for (int i = 0; i < parent->children->length; ++i) {