summaryrefslogtreecommitdiffstats
path: root/tdmlib/dmctl.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-23 15:50:32 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-23 15:50:32 -0600
commit68cba853735b2d8a266367f47fe11040966ce85c (patch)
tree7de98b4aac3cd664e8b10dc80ad35510e51f143c /tdmlib/dmctl.cpp
parent3126f2cf71e835c1aac0dde6d878637a5a2b216d (diff)
downloadtdebase-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/dmctl.cpp')
-rw-r--r--tdmlib/dmctl.cpp16
1 files changed, 9 insertions, 7 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