From 662466e8db773926bf61b21280194a3540ae26ec Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 23 Oct 2018 00:02:08 +1000 Subject: Fix crash when resizing container hidden in the scratchpad Firstly, the container was wrongly identifying as a tiling container because it had no workspace. Secondly, when calculating the maximum possible size we can't use the workspace if it's not there, so we'll allow unlimited size in this case. --- sway/tree/container.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sway/tree/container.c') diff --git a/sway/tree/container.c b/sway/tree/container.c index b41e8dd4..58d3df34 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -727,8 +727,14 @@ void container_set_geometry_from_floating_view(struct sway_container *con) { } bool container_is_floating(struct sway_container *container) { - return !container->parent && container->workspace && - list_find(container->workspace->floating, container) != -1; + if (!container->parent && container->workspace && + list_find(container->workspace->floating, container) != -1) { + return true; + } + if (container->scratchpad) { + return true; + } + return false; } void container_get_box(struct sway_container *container, struct wlr_box *box) { -- cgit v1.2.3-54-g00ecf