dialogActive = true;
if ( !logoutConfirmed ) {
KApplication::kApplication()->updateUserTimestamp();
- KSMShutdownFeedback::start(); // make the screen gray
QString theme = cg.readEntry( "theme", "default" );
logoutConfirmed = KSMShutdownDlg::confirmShutdown( maysd, choose, sdtype, theme);
// ###### We can't make the screen remain gray while talking to the apps,
}
if ( clients.isEmpty() )
completeShutdownOrCheckpoint();
- } else {
- KSMShutdownFeedback::stop(); // make the screen become normal again
}
dialogActive = false;
}
// this is a WType_Popup on purpose. Do not change that! Not
// having a popup here has severe side effects.
{
+ KSMShutdownFeedback::start(); // make the screen gray
+
KDialog::centerOnScreen(this, -3);
//kDebug() << "Creating QML view";
connect(rootObject, SIGNAL(suspendRequested(int)), SLOT(slotSuspend(int)) );
connect(rootObject, SIGNAL(rebootRequested()), SLOT(slotReboot()));
connect(rootObject, SIGNAL(rebootRequested2(int)), SLOT(slotReboot(int)) );
- connect(rootObject, SIGNAL(cancelRequested()), SLOT(reject()));
+ connect(rootObject, SIGNAL(cancelRequested()), SLOT(slotCancel()));
connect(rootObject, SIGNAL(lockScreenRequested()), SLOT(slotLockScreen()));
m_view->show();
m_view->setFocus();
accept();
}
-
void KSMShutdownDlg::slotLockScreen()
{
QDBusMessage call = QDBusMessage::createMethodCall("org.freedesktop.ScreenSaver",
accept();
}
-
void KSMShutdownDlg::slotSuspend(int spdMethod)
{
switch (spdMethod) {
reject();
}
+void KSMShutdownDlg::slotCancel()
+{
+ KSMShutdownFeedback::stop(); // make the screen become normal again
+ reject();
+}
+
bool KSMShutdownDlg::confirmShutdown(
bool maysd, bool choose, KWorkSpace::ShutdownType& sdtype,
const QString& theme)
KApplication::quitOnSignal();
KIconLoader::global()->addAppDir("ksmserver");
qAddPostRoutine(KSMShutdownFeedback::stop);
- KSMShutdownFeedback::start();
QString sdtypeOption = args->getOption("type").toLower();