From c52b1cf45ab1be0e6fcc323eb4889c7bd767ba3f Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Tue, 14 Jan 2020 17:08:01 -0700 Subject: Fix crash when showing scratchpad hidden split containers --- sway/tree/root.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sway/tree/root.c') diff --git a/sway/tree/root.c b/sway/tree/root.c index 46a140ef..ebd185ec 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c @@ -132,6 +132,11 @@ void root_scratchpad_show(struct sway_container *con) { if (old_ws) { container_detach(con); workspace_consider_destroy(old_ws); + } else { + // Act on the ancestor of scratchpad hidden split containers + while (con->parent) { + con = con->parent; + } } workspace_add_floating(new_ws, con); -- cgit v1.2.3-54-g00ecf