summaryrefslogtreecommitdiffstats
path: root/tdmlib/dmctl.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-18 10:22:48 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-18 10:22:48 -0500
commit1eb5bc816598318458e3a6459663af103a46094b (patch)
tree145e8ec65da86972a2fcf2f25ff898f1f29009a0 /tdmlib/dmctl.cpp
parentd41051b3a2e2440f8648a8b30bc0e4b3524d3f13 (diff)
downloadtdebase-1eb5bc816598318458e3a6459663af103a46094b.tar.gz
tdebase-1eb5bc816598318458e3a6459663af103a46094b.zip
Beautify logout process
Diffstat (limited to 'tdmlib/dmctl.cpp')
-rw-r--r--tdmlib/dmctl.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tdmlib/dmctl.cpp b/tdmlib/dmctl.cpp
index cd970c5e6..9cf7e9d34 100644
--- a/tdmlib/dmctl.cpp
+++ b/tdmlib/dmctl.cpp
@@ -37,7 +37,7 @@
#include <fcntl.h>
#include <errno.h>
-static enum { Dunno, NoDM, NewTDM, OldTDM, GDM } DMType = Dunno;
+static int DMType = DM::Unknown;
static const char *ctl, *dpy;
DM::DM() : fd( -1 )
@@ -45,7 +45,7 @@ DM::DM() : fd( -1 )
char *ptr;
struct sockaddr_un sa;
- if (DMType == Dunno) {
+ if (DMType == Unknown) {
if (!(dpy = ::getenv( "DISPLAY" )))
DMType = NoDM;
else if ((ctl = ::getenv( "DM_CONTROL" )))
@@ -439,4 +439,10 @@ DM::GDMAuthenticate()
fclose (fp);
}
+int
+DM::type()
+{
+ return DMType;
+}
+
#endif // Q_WS_X11