Commit 8d1645bc authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

If restored or started hidden in systray, report start done to WM directly

parent 4abe6d52
Pipeline #117402 passed with stage
in 1 minute and 47 seconds
......@@ -209,7 +209,10 @@ QT_WARNING_POP
if (restoreMode == WindowRestore)
mainWindow->restore();
else if (Preferences::self()->showTrayIcon() && Preferences::self()->hideToTrayOnStartup())
{
mainWindow->systemTrayIcon()->hideWindow();
KStartupInfo::appStarted();
}
else
mainWindow->show();
......
......@@ -46,6 +46,7 @@
#include <KStandardShortcut>
#include <KNotifyConfigWidget>
#include <KGlobalAccel>
#include <KStartupInfo>
MainWindow::MainWindow() : KXmlGuiWindow(nullptr)
{
......@@ -672,6 +673,10 @@ bool MainWindow::restore()
// TODO: also save & restore any TrayIcon state, needs API in KStatusNotifierItem
// in case no window is shown & registered, the window manager needs to be told directly the start is done
if (!show)
KStartupInfo::appStarted();
return KXmlGuiWindow::restore(1, show);
}
......
Markdown is supported
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