diff --git a/kded/daemon.h b/kded/daemon.h --- a/kded/daemon.h +++ b/kded/daemon.h @@ -87,6 +87,7 @@ QTimer* m_saveTimer; QTimer* m_lidClosedTimer; KScreen::OsdManager *m_osdManager; + bool m_startingUp = true; }; #endif /*KSCREEN_DAEMON_H*/ diff --git a/kded/daemon.cpp b/kded/daemon.cpp --- a/kded/daemon.cpp +++ b/kded/daemon.cpp @@ -116,8 +116,10 @@ m_lidClosedTimer->stop(); }); - connect(Generator::self(), &Generator::ready, - this, &KScreenDaemon::applyConfig); + connect(Generator::self(), &Generator::ready, this, [this] { + applyConfig(); + m_startingUp = false; + }); Generator::self()->setCurrentConfig(m_monitoredConfig->data()); monitorConnectedChange(); @@ -219,14 +221,17 @@ void KScreenDaemon::applyIdealConfig() { - if (m_monitoredConfig->data()->connectedOutputs().count() < 2) { - m_osdManager->hideOsd(); - doApplyConfig(Generator::self()->idealConfig(m_monitoredConfig->data())); - } else { + const bool showOsd = m_monitoredConfig->data()->connectedOutputs().count() > 1 && !m_startingUp; + + doApplyConfig(Generator::self()->idealConfig(m_monitoredConfig->data())); + + if (showOsd) { qCDebug(KSCREEN_KDED) << "Getting ideal config from user via OSD..."; auto action = m_osdManager->showActionSelector(); connect(action, &KScreen::OsdAction::selected, this, &KScreenDaemon::applyOsdAction); + } else { + m_osdManager->hideOsd(); } }