Browse Source

restart X on logout

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/slim/trunk@100 7c53e7cc-98ea-0310-8f1f-a0b24da60408
sip 18 years ago
parent
commit
d4aabe8860
2 changed files with 9 additions and 2 deletions
  1. 8 0
      app.cpp
  2. 1 2
      app.h

+ 8 - 0
app.cpp

@@ -368,7 +368,10 @@ void App::Login() {
 #ifndef XNEST_DEBUG
     // Re-activate log file
     OpenLog();
+    RestartServer();
 #endif
+
+
 }
 
 
@@ -444,6 +447,11 @@ int CatchErrors(Display *dpy, XErrorEvent *ev) {
     return 0;
 }
 
+void App::RestartServer() {
+        StopServer(); 
+        RemoveLock();
+        Run();
+} 
 
 void App::KillAllClients(Bool top) {
     Window dummywindow;

+ 1 - 2
app.h

@@ -23,8 +23,6 @@
 #include "panel.h"
 #include "cfg.h"
 
-using namespace std;
-
 class App {
 public:
     App(int argc, char** argv);
@@ -45,6 +43,7 @@ private:
     void Console();
     void Exit();
     void KillAllClients(Bool top);
+    void RestartServer();
     void ReadConfig();
     void OpenLog();
     void CloseLog();