summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/kgapp.cpp
diff options
context:
space:
mode:
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();