aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/LPanel.cpp')
-rw-r--r--lumina-desktop/LPanel.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 51c994a5..f979ea15 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -64,6 +64,19 @@ LPanel::~LPanel(){
}
+void LPanel::prepareToClose(){
+ //Go through and remove all the plugins
+ for(int i=0; i<PLUGINS.length(); i++){
+ if( PLUGINS[i]->type().startsWith("systemtray---") ){
+ static_cast<LSysTray*>(PLUGINS[i])->stop();
+ }
+ layout->takeAt(i); //remove from the layout
+ delete PLUGINS.takeAt(i); //delete the actual widget
+ LSession::processEvents();
+ i--; //need to back up one space to not miss another plugin
+ }
+}
+
//===========
// PUBLIC SLOTS
//===========
bgstack15