aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-10-22 12:27:25 -0400
committerKen Moore <ken@pcbsd.org>2014-10-22 12:27:25 -0400
commita7c41358df9cdfdc5c1df3a3d976adead9c5fbf0 (patch)
tree53173170341a542ed6967516f399089eb31a3665 /lumina-desktop
parentFix the system tray checking to once run one at a time (to prevent possible c... (diff)
downloadlumina-a7c41358df9cdfdc5c1df3a3d976adead9c5fbf0.tar.gz
lumina-a7c41358df9cdfdc5c1df3a3d976adead9c5fbf0.tar.bz2
lumina-a7c41358df9cdfdc5c1df3a3d976adead9c5fbf0.zip
Fix another possible crash in the system tray: when a tray icon fails to get embedded the container widget was not getting removed in the right order.
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/panel-plugins/systemtray/LSysTray.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
index 1d1ebe67..157001c6 100644
--- a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
+++ b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
@@ -210,7 +210,14 @@ void LSysTray::checkAll(){
LSession::processEvents();
//qDebug() << " - Attach tray app";
cont->attachApp(wins[i]);
- if(cont->appID()==0){ qDebug() << "Invalid Tray Container:"; delete cont; continue; } //could not attach window
+ if(cont->appID()==0){
+ //could not attach window - remove the widget
+ qDebug() << "Invalid Tray Container:";
+ trayIcons.takeAt(trayIcons.length()-1); //Always at the end
+ LI->removeWidget(cont);
+ delete cont;
+ continue;
+ }
LI->update(); //make sure there is no blank space in the layout
}
//qDebug() << " - System Tray: check done";
bgstack15