summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/kgapp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-15 22:17:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-15 22:17:46 +0000
commit34869df7a3d0fb0dbf63885fb9421df772d953ee (patch)
treed140d73a32a8e348ff81b6bcc47a326fcf6f073c /kdm/kfrontend/kgapp.cpp
parentd4fbbf542788f9028d8cb20f49ea703feb657d96 (diff)
downloadtdebase-34869df7a3d0fb0dbf63885fb9421df772d953ee.tar.gz
tdebase-34869df7a3d0fb0dbf63885fb9421df772d953ee.zip
Allow kdm to preload kwin
This provides a smoother and more unified logon experience git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253865 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm/kfrontend/kgapp.cpp')
-rw-r--r--kdm/kfrontend/kgapp.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp
index 03bc361c2..0aaaa6e9b 100644
--- a/kdm/kfrontend/kgapp.cpp
+++ b/kdm/kfrontend/kgapp.cpp
@@ -63,6 +63,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <pwd.h>
bool argb_visual_available = false;
+bool has_kwin = false;
+bool is_themed = false;
static int
ignoreXError( Display *dpy ATTR_UNUSED, XErrorEvent *event ATTR_UNUSED )
@@ -260,6 +262,7 @@ kg_main( const char *argv0 )
SecureDisplay( dpy );
KProcess *proc = 0;
KProcess *comp = 0;
+ KProcess *kwin = 0;
if (!_grabServer) {
if (_useBackground) {
proc = new KProcess;
@@ -277,6 +280,13 @@ kg_main( const char *argv0 )
comp->start(KProcess::NotifyOnExit, KProcess::Stdin);
}
+ if (!_windowManager.isEmpty()) {
+ kwin = new KProcess;
+ *kwin << TQCString( argv0, strrchr( argv0, '/' ) - argv0 + 2 ) + _windowManager.ascii();
+ kwin->start();
+ has_kwin = true;
+ }
+
GSendInt( G_Ready );
kdDebug() << timestamp() << " main1" << endl;
@@ -323,8 +333,10 @@ kg_main( const char *argv0 )
XSetErrorHandler( ignoreXError );
KThemedGreeter *tgrt;
dialog = tgrt = new KThemedGreeter;
+ is_themed = true;
kdDebug() << timestamp() << " themed" << endl;
if (!tgrt->isOK()) {
+ is_themed = false;
delete tgrt;
dialog = new KStdGreeter;
dialog->move(dialog->x() + primaryScreenPosition.x(), dialog->y() + primaryScreenPosition.y());
@@ -394,6 +406,11 @@ kg_main( const char *argv0 )
comp->detach();
delete comp;
}
+ if (kwin) {
+ kwin->closeStdin();
+ kwin->detach();
+ delete kwin;
+ }
delete proc;
UnsecureDisplay( dpy );
restore_modifiers();