From f7aed5c7e596bc2f03426d6a91214123000d7ed7 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 25 Oct 2018 17:32:16 +1000 Subject: Fix containers not being resized when entering scratchpad This fixes a regression introduced by 662466e8db773926bf61b21280194a3540ae26ec. When adding a container to the scratchpad, setting container->scratchpad = true before container_set_floating made container_set_floating believe that the container was already floating. This fixes it by setting the property afterwards instead. --- sway/tree/root.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sway/tree/root.c b/sway/tree/root.c index e5eb8f2a..9bda7c28 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c @@ -59,13 +59,13 @@ void root_scratchpad_add_container(struct sway_container *con) { if (!sway_assert(!con->scratchpad, "Container is already in scratchpad")) { return; } - con->scratchpad = true; - list_add(root->scratchpad, con); struct sway_container *parent = con->parent; struct sway_workspace *workspace = con->workspace; container_set_floating(con, true); container_detach(con); + con->scratchpad = true; + list_add(root->scratchpad, con); struct sway_seat *seat = input_manager_current_seat(); if (parent) { -- cgit v1.2.3-54-g00ecf