From 10e41144596fc9ced40fc349d9ecd099b1c2ea19 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 11 Dec 2009 20:21:27 +0000 Subject: 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 --- kdm/backend/session.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'kdm/backend/session.c') 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 #include +#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 -- cgit v1.2.1