aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/WMProcess.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-06-08 08:37:19 -0400
committerKen Moore <ken@pcbsd.org>2015-06-08 08:37:19 -0400
commit25490dd7d48833c8cdabb95a99df31894fd827d4 (patch)
tree989cba0c461090c2dce8181b6819599cb8df1bae /lumina-desktop/WMProcess.cpp
parentFinish up the desktop re-scaling routines for ensure the same interface if yo... (diff)
downloadlumina-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.cpp10
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
bgstack15