Stop the display after display server is stopped.

This is for recovering from display server crashes etc.
This commit is contained in:
Abdurrahman AVCI 2013-03-25 00:44:14 +02:00
parent a79fde8e6f
commit 08be86f148
3 changed files with 11 additions and 1 deletions

View File

@ -60,8 +60,12 @@ namespace SDDM {
m_display = QString(":%1").arg(m_displayNumber);
// connect signals
// stop the display after user session ends
connect(m_authenticator, SIGNAL(stopped()), this, SLOT(stop()));
// stop the display after the display server stopped
connect(m_displayServer, SIGNAL(stopped()), this, SLOT(stop()));
connect(m_socketServer, SIGNAL(login(QLocalSocket*,QString,QString,QString)), this, SLOT(login(QLocalSocket*,QString,QString,QString)));
connect(this, SIGNAL(loginFailed(QLocalSocket*)), m_socketServer, SLOT(loginFailed(QLocalSocket*)));

View File

@ -134,6 +134,9 @@ namespace SDDM {
// clean up
process->deleteLater();
process = nullptr;
// emit signal
emit stopped();
}
bool DisplayServer::waitForStarted(int msecs) {

View File

@ -41,6 +41,9 @@ namespace SDDM {
void stop();
void finished();
signals:
void stopped();
private:
bool waitForStarted(int msecs = 10000);