diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-11-23 15:50:32 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-11-23 15:50:32 -0600 |
commit | 68cba853735b2d8a266367f47fe11040966ce85c (patch) | |
tree | 7de98b4aac3cd664e8b10dc80ad35510e51f143c /tdmlib | |
parent | 3126f2cf71e835c1aac0dde6d878637a5a2b216d (diff) | |
download | tdebase-68cba853735b2d8a266367f47fe11040966ce85c.tar.gz tdebase-68cba853735b2d8a266367f47fe11040966ce85c.zip |
Fix twin deleting comptontdepidfile when compton-tde already running on startup
Fix long-standing bug in calling desktop lock methods over DCOP from within kdesktop process
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(); |