diff options
author | Ken Moore <ken@pcbsd.org> | 2014-10-22 12:27:25 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-10-22 12:27:25 -0400 |
commit | a7c41358df9cdfdc5c1df3a3d976adead9c5fbf0 (patch) | |
tree | 53173170341a542ed6967516f399089eb31a3665 | |
parent | Fix the system tray checking to once run one at a time (to prevent possible c... (diff) | |
download | lumina-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.
-rw-r--r-- | lumina-desktop/panel-plugins/systemtray/LSysTray.cpp | 9 |
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"; |