summaryrefslogtreecommitdiffstats
path: root/tdm
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-11 15:14:55 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-11 15:14:55 -0600
commita305c0832688209d5359c212be92f54df9561ecc (patch)
tree667f87257567f94f7cf62125c8106d3876ceeab5 /tdm
parent4952641328f28a541e3fdf2200df4e1e4b11d5dd (diff)
downloadtdebase-a305c0832688209d5359c212be92f54df9561ecc.tar.gz
tdebase-a305c0832688209d5359c212be92f54df9561ecc.zip
Terminate twin manager unless a TDE or failsafe session was selected
This closes Bug 824
Diffstat (limited to 'tdm')
-rw-r--r--tdm/kfrontend/kgapp.cpp11
-rw-r--r--tdm/kfrontend/kgreeter.cpp2
-rw-r--r--tdm/kfrontend/kgreeter.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp
index 5ad52dda6..f6123891c 100644
--- a/tdm/kfrontend/kgapp.cpp
+++ b/tdm/kfrontend/kgapp.cpp
@@ -257,6 +257,7 @@ kg_main( const char *argv0 )
XSetIOErrorHandler( xIOErr );
TQString login_user;
+ TQString login_session_wm;
Display *dpy = qt_xdisplay();
@@ -409,6 +410,7 @@ kg_main( const char *argv0 )
Debug( "left event loop\n" );
login_user = static_cast<KGreeter*>(dialog)->curUser;
+ login_session_wm = static_cast<KGreeter*>(dialog)->curWMSession;
if (rslt != ex_greet) {
delete dialog;
@@ -451,8 +453,13 @@ kg_main( const char *argv0 )
delete comp;
}
if (twin) {
- twin->closeStdin();
- twin->detach();
+ if (login_session_wm.endsWith("/starttde") || (login_session_wm == "failsafe")) {
+ twin->closeStdin();
+ twin->detach();
+ }
+ else {
+ twin->kill();
+ }
delete twin;
}
delete proc;
diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp
index 30685a865..717d2549f 100644
--- a/tdm/kfrontend/kgreeter.cpp
+++ b/tdm/kfrontend/kgreeter.cpp
@@ -842,10 +842,12 @@ KGreeter::verifyOk()
GSendInt( G_PutDmrc );
GSendStr( "Session" );
GSendStr( sessionTypes[curSel].type.utf8() );
+ curWMSession = sessionTypes[curSel].type.utf8();
} else if (!prevValid) {
GSendInt( G_PutDmrc );
GSendStr( "Session" );
GSendStr( "default" );
+ curWMSession = sessionTypes[curSel].type.utf8();
}
GSendInt( G_Ready );
closingDown = true;
diff --git a/tdm/kfrontend/kgreeter.h b/tdm/kfrontend/kgreeter.h
index 0de48a21d..78a6ded8c 100644
--- a/tdm/kfrontend/kgreeter.h
+++ b/tdm/kfrontend/kgreeter.h
@@ -75,7 +75,7 @@ class KGreeter : public KGDialog, public KGVerifyHandler {
void handleInputPipe();
public:
- TQString curUser, dName;
+ TQString curUser, curWMSession, dName;
protected:
void readFacesList();