Commit a344b9fa authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Nate Graham
Browse files

Restore the view when the process is relaunched and it's on the SNI

When we move Discover into the SNI while updating, if Discover is
launched, it should restore the view.

BUG: 457204
parent e5d1e498
......@@ -412,6 +412,10 @@ bool DiscoverObject::quitWhenIdle()
void DiscoverObject::restore()
{
if (!m_sni) {
return;
}
disconnect(TransactionModel::global(), &TransactionModel::countChanged, this, &DiscoverObject::reconsiderQuit);
disconnect(m_sni, &KStatusNotifierItem::activateRequested, this, &DiscoverObject::restore);
......
......@@ -169,6 +169,7 @@ int main(int argc, char **argv)
return 0;
} else {
auto onActivateRequested = [mainWindow](const QStringList &arguments, const QString & /*workingDirectory*/) {
mainWindow->restore();
auto window = qobject_cast<QWindow *>(mainWindow->rootObject());
if (!window) {
// Should never happen anyway
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment