From 7fc15b48fba288546727cebd0db15acba9006a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 3 Dec 2015 17:34:00 +0100 Subject: [PATCH] Drop the Client specific code from Deleted::copyToDeleted As DecoratedClient is now on AbstractClient we can have all copying on AbstractClient and don't need any specific Client code. --- deleted.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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();