diff --git a/deleted.cpp b/deleted.cpp index 115b2b2b11..7815a9b50c 100644 --- a/deleted.cpp +++ b/deleted.cpp @@ -86,10 +86,13 @@ void Deleted::copyToDeleted(Toplevel* c) m_windowRole = c->windowRole(); if (WinInfo* cinfo = dynamic_cast< WinInfo* >(info)) cinfo->disable(); - Client* client = dynamic_cast(c); - if (client) { + if (AbstractClient *client = dynamic_cast(c)) { no_border = client->noBorder(); if (!no_border) { + client->layoutDecorationRects(decoration_left, + decoration_top, + decoration_right, + decoration_bottom); if (client->isDecorated()) { if (Decoration::Renderer *renderer = client->decoratedClient()->renderer()) { m_decorationRenderer = renderer; @@ -97,14 +100,6 @@ void Deleted::copyToDeleted(Toplevel* c) } } } - } - if (AbstractClient *client = dynamic_cast(c)) { - if (!client->noBorder()) { - client->layoutDecorationRects(decoration_left, - decoration_top, - decoration_right, - decoration_bottom); - } m_wasClient = true; m_minimized = client->isMinimized(); m_modal = client->isModal();