Commit b1a0172a authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Implement saveCurrentSession

parent a9764a9b
......@@ -211,7 +211,6 @@ void KSMServer::performLogout()
QPalette palette;
palette.setColor( QApplication::desktop()->backgroundRole(), Qt::black );
QApplication::setPalette(palette);
wmPhase1WaitingCount = 0;
saveType = saveSession?SmSaveBoth:SmSaveGlobal;
#ifndef NO_LEGACY_SESSION_MANAGEMENT
performLegacySessionSave();
......@@ -249,7 +248,6 @@ void KSMServer::performLogout()
void KSMServer::saveCurrentSession()
{
abort(); // FIXME IMPLEMENT NEW SAVING ALSO HERE!
if ( state != Idle )
return;
......@@ -258,13 +256,15 @@ void KSMServer::saveCurrentSession()
state = Checkpoint;
wmPhase1WaitingCount = 0;
saveType = SmSaveLocal;
saveSession = true;
#ifndef NO_LEGACY_SESSION_MANAGEMENT
performLegacySessionSave();
#endif
auto aboutToSaveCall = m_kwinInterface->aboutToSaveSession(currentSession());
aboutToSaveCall.waitForFinished();
const auto pendingClients = clients;
for (KSMClient *c : pendingClients) {
SmsSaveYourself( c->connection(), saveType, false, SmInteractStyleNone, false );
......
......@@ -620,7 +620,6 @@ KSMServer::KSMServer(InitFlags flags)
state = Idle;
saveSession = false;
wmPhase1WaitingCount = 0;
KConfigGroup config(KSharedConfig::openConfig(), "General");
clientInteracting = nullptr;
xonCommand = config.readEntry( "xonCommand", "xon" );
......
......@@ -217,7 +217,6 @@ private:
};
State state;
bool saveSession;
int wmPhase1WaitingCount;
int saveType;
bool clean;
......
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