diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-04-13 00:48:27 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-04-14 02:27:28 +0200 |
commit | 2b0e13211cc2ce86926cfe133ce29df3a6141e91 (patch) | |
tree | 3dfcf227e926b9637e76d178914447d4e386d722 /kdesktop/lockeng.cc | |
parent | 7188f7044b0bb11a24754cfa83d39ecc0721bbdb (diff) | |
download | tdebase-2b0e13211cc2ce86926cfe133ce29df3a6141e91.tar.gz tdebase-2b0e13211cc2ce86926cfe133ce29df3a6141e91.zip |
Ensure desktop is completely hidden before sending fullyOnline()
Do not block kdesktop process while waiting for kdesktop_lock to engage prior to VT switch/new VT requests made from within kdesktop
(cherry picked from commit 78d33c29157b8e3a0b81c36f73ec5f958439565c)
Diffstat (limited to 'kdesktop/lockeng.cc')
-rw-r--r-- | kdesktop/lockeng.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc index 6ce26cf4e..27b57bc51 100644 --- a/kdesktop/lockeng.cc +++ b/kdesktop/lockeng.cc @@ -22,6 +22,8 @@ #include <dcopclient.h> #include <assert.h> +#include <dmctl.h> + #include <dbus/dbus-shared.h> #include <tqdbusdata.h> #include <tqdbuserror.h> @@ -79,6 +81,8 @@ SaverEngine::SaverEngine() mSAKProcess(NULL), mTerminationRequested(false), mSaverProcessReady(false), + mNewVTAfterLockEngage(false), + mSwitchVTAfterLockEngage(-1), dBusLocal(0), dBusWatch(0), systemdSession(0) @@ -599,6 +603,15 @@ void SaverEngine::lockProcessFullyActivated() params << TQT_DBusData::fromBool(true); TQT_DBusMessage reply = systemdSession->sendWithReply("SetIdleHint", params); } + + if (mNewVTAfterLockEngage) { + DM().startReserve(); + mNewVTAfterLockEngage = false; + } + else if (mSwitchVTAfterLockEngage != -1) { + DM().switchVT(mSwitchVTAfterLockEngage); + mSwitchVTAfterLockEngage = -1; + } } void SaverEngine::slotLockProcessReady() @@ -854,6 +867,16 @@ bool SaverEngine::waitForLockEngage() { return mLockProcess.isRunning(); } +void SaverEngine::lockScreenAndDoNewSession() { + mNewVTAfterLockEngage = true; + lockScreen(); +} + +void SaverEngine::lockScreenAndSwitchSession(int vt) { + mSwitchVTAfterLockEngage = vt; + lockScreen(); +} + void SaverEngineThreadHelperObject::terminateThread() { TQEventLoop* eventLoop = TQApplication::eventLoop(); if (eventLoop) { |