diff options
author | Ken Moore <ken@pcbsd.org> | 2015-06-08 08:37:19 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-06-08 08:37:19 -0400 |
commit | 25490dd7d48833c8cdabb95a99df31894fd827d4 (patch) | |
tree | 989cba0c461090c2dce8181b6819599cb8df1bae /lumina-desktop/WMProcess.cpp | |
parent | Finish up the desktop re-scaling routines for ensure the same interface if yo... (diff) | |
download | lumina-25490dd7d48833c8cdabb95a99df31894fd827d4.tar.gz lumina-25490dd7d48833c8cdabb95a99df31894fd827d4.tar.bz2 lumina-25490dd7d48833c8cdabb95a99df31894fd827d4.zip |
Add a new function to "restart" the window manager, and run this if something changed with regards to the available monitors/displays (such as when adding/removing a monitor). This forces Fluxbox to reload completely so it picks up on the new display layout.
Diffstat (limited to 'lumina-desktop/WMProcess.cpp')
-rw-r--r-- | lumina-desktop/WMProcess.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lumina-desktop/WMProcess.cpp b/lumina-desktop/WMProcess.cpp index e84e4c22..9e398f93 100644 --- a/lumina-desktop/WMProcess.cpp +++ b/lumina-desktop/WMProcess.cpp @@ -43,6 +43,16 @@ void WMProcess::stopWM(){ } } +void WMProcess::restartWM(){ + if(isRunning()){ + inShutdown = true; + this->kill(); + if(!this->waitForFinished(5000) ){ this->terminate(); }; + inShutdown = false; + } + this->startWM(); +} + void WMProcess::updateWM(){ if(isRunning()){ ::kill(this->pid(), SIGUSR2); //send fluxbox the signal to reload it's configuration |