summaryrefslogtreecommitdiffstats
path: root/tdmlib
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 14:36:50 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 14:36:50 -0500
commit960cc8392da291eaf6c90d2101b721f6c20488f3 (patch)
tree63ecdf7a203cd721c0652bad2023a3e9f53f995c /tdmlib
parent3a84ecae5ded7370a7dfee43f25dd21269d65a7c (diff)
downloadtdebase-960cc8392da291eaf6c90d2101b721f6c20488f3.tar.gz
tdebase-960cc8392da291eaf6c90d2101b721f6c20488f3.zip
Update tdehw-based media manager for new mount API
Allow active VT to be queried from tdm Only display media notification messages on active VT Hide logout action buttons if logout process unstalls
Diffstat (limited to 'tdmlib')
-rw-r--r--tdmlib/dmctl.cpp38
-rw-r--r--tdmlib/dmctl.h2
2 files changed, 38 insertions, 2 deletions
diff --git a/tdmlib/dmctl.cpp b/tdmlib/dmctl.cpp
index 9cf7e9d3..c4fc0a5d 100644
--- a/tdmlib/dmctl.cpp
+++ b/tdmlib/dmctl.cpp
@@ -392,8 +392,42 @@ DM::switchVT( int vt )
void
DM::lockSwitchVT( int vt )
{
- if (switchVT( vt ))
- kapp->dcopClient()->send( "kdesktop", "KScreensaverIface", "lock()", TQString("") );
+ if (switchVT( vt )) {
+ 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);
+ }
+}
+
+int
+DM::activeVT()
+{
+ if (DMType == OldTDM) {
+ return -1;
+ }
+
+ TQCString re;
+
+ if (DMType == GDM) {
+ return -1;
+ }
+ else {
+ if (!exec( "activevt\n", re )) {
+ return -1;
+ }
+ TQString retrunc = TQString( re.data() + 3 );
+ bool ok = false;
+ int activevt = retrunc.toInt(&ok, 10);
+ if (ok) {
+ return activevt;
+ }
+ else {
+ return -1;
+ }
+ }
}
void
diff --git a/tdmlib/dmctl.h b/tdmlib/dmctl.h
index 376a9ddd..f50f72f6 100644
--- a/tdmlib/dmctl.h
+++ b/tdmlib/dmctl.h
@@ -54,6 +54,7 @@ public:
bool localSessions( SessList &list );
bool switchVT( int vt );
void lockSwitchVT( int vt );
+ int activeVT();
bool bootOptions( TQStringList &opts, int &dflt, int &curr );
@@ -87,6 +88,7 @@ public:
void startReserve() {}
bool localSessions( SessList &list ) { return false; }
void switchVT( int vt ) {}
+ int activeVT() { return -1; }
bool bootOptions( TQStringList &opts, int &dflt, int &curr );