diff options
Diffstat (limited to 'tdmlib')
-rw-r--r-- | tdmlib/dmctl.cpp | 16 | ||||
-rw-r--r-- | tdmlib/dmctl.h | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tdmlib/dmctl.cpp b/tdmlib/dmctl.cpp index 6fea12b5a..cc9535ab4 100644 --- a/tdmlib/dmctl.cpp +++ b/tdmlib/dmctl.cpp @@ -393,15 +393,15 @@ void DM::lockSwitchVT( int 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); + // Force remote call to ensure that blocking is enforced even if this call is being made from inside the "kdesktop" application... + // If this is not done DCOP will translate the call into a send and the desktop of the locked session will be shown after VT switch as above + if (system("dcop kdesktop KScreensaverIface lock") == 0) { + if (!switchVT( vt )) { + // Switching VT failed; unlock... + // system("dcop kdesktop KScreensaverIface unlock") + } } } } @@ -484,3 +484,5 @@ DM::type() } #endif // Q_WS_X11 + +#include "dmctl.moc"
\ No newline at end of file diff --git a/tdmlib/dmctl.h b/tdmlib/dmctl.h index f50f72f6c..90928e2e3 100644 --- a/tdmlib/dmctl.h +++ b/tdmlib/dmctl.h @@ -32,10 +32,10 @@ struct SessEnt { typedef TQValueList<SessEnt> SessList; class DM { - #ifdef Q_WS_X11 public: + DM(); ~DM(); |