Make sure to ignore applications that can't be restored.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/2/head
Michele Calgaro 4 years ago
parent 63502d3ac4
commit 097107791f
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1070,6 +1070,10 @@ bool TQTrayLabel::restoreState(TDEConfig *config)
dock();
scanClients(); // Grab window
if (mDockedWindow == None)
{
return false;
}
if (mWithdrawn)
{
withdraw();

@ -543,7 +543,11 @@ void TrayLabelMgr::doRestoreSession()
{
TRACE("Restoring Application[%s]", pname.ascii());
manageTrayLabel(new TQTrayLabel(TQStringList::split(" ", pname), 0));
mTrayLabels.getFirst()->restoreState(config);
if (!mTrayLabels.getFirst()->restoreState(config))
{
// Failed to restore the application, remove the tray label
delete mTrayLabels.take(0);
}
}
}
}

Loading…
Cancel
Save