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.
This commit is contained in:
Martin Gräßlin 2015-12-03 17:34:00 +01:00
parent 6270ea35a2
commit 7fc15b48fb

View file

@ -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<Client*>(c);
if (client) {
if (AbstractClient *client = dynamic_cast<AbstractClient*>(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<AbstractClient*>(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();