Better support AbstractClient in Deleted::copyToDeleted

At the moment only decoration/border handling is Client specific.
Everything else can be shared with AbstractClient.
This commit is contained in:
Martin Gräßlin 2015-09-14 09:06:41 +02:00
parent 305699be8e
commit ba8d11b305

View file

@ -86,7 +86,6 @@ void Deleted::copyToDeleted(Toplevel* c)
cinfo->disable();
Client* client = dynamic_cast<Client*>(c);
if (client) {
m_wasClient = true;
no_border = client->noBorder();
if (!no_border) {
client->layoutDecorationRects(decoration_left,
@ -100,10 +99,11 @@ void Deleted::copyToDeleted(Toplevel* c)
}
}
}
m_minimized = client->isMinimized();
m_modal = client->isModal();
}
if (AbstractClient *client = dynamic_cast<AbstractClient*>(c)) {
m_wasClient = true;
m_minimized = client->isMinimized();
m_modal = client->isModal();
m_mainClients = client->mainClients();
foreach (AbstractClient *c, m_mainClients) {
connect(c, &AbstractClient::windowClosed, this, &Deleted::mainClientClosed);