summaryrefslogtreecommitdiffstats
path: root/kdm/backend/session.c
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kdm/backend/session.c
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm/backend/session.c')
-rw-r--r--kdm/backend/session.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/kdm/backend/session.c b/kdm/backend/session.c
index 72da0a820..9a12ce312 100644
--- a/kdm/backend/session.c
+++ b/kdm/backend/session.c
@@ -45,6 +45,10 @@ from the copyright holder.
#include <ctype.h>
#include <signal.h>
+#ifdef WITH_CONSOLE_KIT
+#include "consolekit.h"
+#endif
+
struct display *td;
const char *td_setup = "auto";
@@ -530,6 +534,10 @@ ManageSession( struct display *d )
int ex, cmd;
volatile int clientPid = 0;
volatile Time_t tdiff = 0;
+#ifdef WITH_CONSOLE_KIT
+ char *ck_session_cookie;
+#endif
+
td = d;
Debug( "ManageSession %s\n", d->name );
@@ -626,7 +634,12 @@ ManageSession( struct display *d )
if (td_setup)
SetupDisplay( td_setup );
+#ifdef WITH_CONSOLE_KIT
+ ck_session_cookie = open_ck_session (getpwnam(curuser), d);
+ if (!(clientPid = StartClient(ck_session_cookie))) {
+#else
if (!(clientPid = StartClient())) {
+#endif
LogError( "Client start failed\n" );
SessionExit( EX_NORMAL ); /* XXX maybe EX_REMANAGE_DPY? -- enable in dm.c! */
}
@@ -648,6 +661,14 @@ ManageSession( struct display *d )
catchTerm( SIGTERM );
}
}
+
+#ifdef WITH_CONSOLE_KIT
+ if (ck_session_cookie != NULL) {
+ close_ck_session (ck_session_cookie);
+ free (ck_session_cookie);
+ }
+#endif
+
/*
* Sometimes the Xsession somehow manages to exit before
* a server crash is noticed - so we sleep a bit and wait