summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-21 18:31:16 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-21 18:31:16 -0600
commitc7056bbf7b320a5855760c6b6ecd3f14606e5306 (patch)
treefd81d8afb1f8ec277621377787bfbf9ee7bd7c23
parent84d7db019508c1185f513e864483fd1fd608c05c (diff)
downloadtdebase-c7056bbf7b320a5855760c6b6ecd3f14606e5306.tar.gz
tdebase-c7056bbf7b320a5855760c6b6ecd3f14606e5306.zip
Fix VT switch showing previous users desktop for a short time
-rw-r--r--tdmlib/dmctl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tdmlib/dmctl.cpp b/tdmlib/dmctl.cpp
index c4fc0a5dd..6ee7722a2 100644
--- a/tdmlib/dmctl.cpp
+++ b/tdmlib/dmctl.cpp
@@ -392,13 +392,17 @@ DM::switchVT( int vt )
void
DM::lockSwitchVT( int vt )
{
- if (switchVT( vt )) {
+ if (isSwitchable()) {
TQByteArray data;
TQCString replyType;
TQByteArray replyData;
// Block here until lock is complete
// If this is not done the desktop of the locked session will be shown after VT switch until the lock fully engages!
kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", data, replyType, replyData);
+ if (!switchVT( vt )) {
+ // Switching VT failed; unlock...
+ kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "unlock()", data, replyType, replyData);
+ }
}
}