Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
kdebase4-workspace
suspend-lock.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File suspend-lock.diff of Package kdebase4-workspace
Subject: Use Solid suspend method that also locks screen From: Lubos Lunak Bug: bnc#326848 Patch-upstream: No I don't understand what the difference between the two Solid suspend methods is (or even why there are two), but the one ksmserver in 4.1 uses does not lock the screen, and this one does. Index: ksmserver/shutdowndlg.cpp =================================================================== --- ksmserver/shutdowndlg.cpp.orig +++ ksmserver/shutdowndlg.cpp @@ -43,6 +43,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE #include <kiconloader.h> #include <klocale.h> #include <kuser.h> +#include <solid/powermanagement.h> #include <solid/control/powermanager.h> #include <kwindowsystem.h> #include <netwm.h> @@ -651,9 +652,16 @@ void KSMShutdownDlg::slotSuspend(QAction { m_bootOption.clear(); Solid::Control::PowerManager::SuspendMethod spdMethod = action->data().value<Solid::Control::PowerManager::SuspendMethod>(); + if( spdMethod == Solid::Control::PowerManager::ToRam ) + Solid::PowerManagement::requestSleep(Solid::PowerManagement::SuspendState,0,0); + else if( spdMethod == Solid::Control::PowerManager::ToDisk ) + Solid::PowerManagement::requestSleep(Solid::PowerManagement::HibernateState,0,0); + else + { KJob *job = Solid::Control::PowerManager::suspend( spdMethod ); if (job != 0) job->start(); + } reject(); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor