 |
kdebase-workspace-4.6.5-non-blocking_requestShutdown.patch |
|
From: Aaron Seigo <aseigo@...>
Date: Fri, 30 Sep 2011 12:31:55 +0000
Subject: attempt to make requestShutdown more friendly: non-blocking, not require a sync of the xserver
X-Git-Url: http://quickgit.kde.org/?p=kde-workspace.git&a=commitdiff&h=94b134f964c5fe4f0588e2db70c076c56a3a8091
---
attempt to make requestShutdown more friendly: non-blocking, not require a sync of the xserver
---
--- a/libs/kworkspace/kworkspace.cpp
+++ b/libs/kworkspace/kworkspace.cpp
@@ -174,29 +174,25 @@ static void cleanup_sm()
}
#endif
-bool requestShutDown(
- ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode )
+void requestShutDown(ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode)
{
#ifdef Q_WS_X11
- QApplication::syncX();
- kapp->updateRemoteUserTimestamp( "org.kde.ksmserver" );
/* use ksmserver's dcop interface if necessary */
if ( confirm == ShutdownConfirmYes ||
sdtype != ShutdownTypeDefault ||
sdmode != ShutdownModeDefault )
{
org::kde::KSMServerInterface ksmserver("org.kde.ksmserver", "/KSMServer", QDBusConnection::sessionBus());
- QDBusReply<void> reply = ksmserver.logout((int)confirm, (int)sdtype, (int)sdmode);
- return (reply.isValid());
+ ksmserver.logout((int)confirm, (int)sdtype, (int)sdmode);
+ return;
}
+
if( helper == NULL )
{
helper = new KRequestShutdownHelper();
qAddPostRoutine(cleanup_sm);
}
- return helper->requestShutdown( confirm );
-#else
- return false;
+ helper->requestShutdown( confirm );
#endif
}
--- a/libs/kworkspace/kworkspace.h
+++ b/libs/kworkspace/kworkspace.h
@@ -110,10 +110,8 @@ namespace KWorkSpace
* ShutdownConfirm
* @param sdtype The action to take after logging out. ShutdownType
* @param sdmode If/When the action should be taken. ShutdownMode
- * @return true on success, false if the session manager could not be
- * contacted.
*/
- KDE_EXPORT bool requestShutDown( ShutdownConfirm confirm = ShutdownConfirmDefault,
+ KDE_EXPORT void requestShutDown( ShutdownConfirm confirm = ShutdownConfirmDefault,
ShutdownType sdtype = ShutdownTypeDefault,
ShutdownMode sdmode = ShutdownModeDefault );
|
|
|