diff options
author | Ken Moore <moorekou@gmail.com> | 2015-12-16 12:41:09 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-12-16 12:41:09 -0500 |
commit | 0b3080aead64bc3a8eab348ede748e6caec9c907 (patch) | |
tree | de9cbc88a83d9e3ce5d105bddbd584593371ab4f /lumina-desktop | |
parent | Update the default Lumina setting on non-PCBSD systems a bit. (diff) | |
download | lumina-0b3080aead64bc3a8eab348ede748e6caec9c907.tar.gz lumina-0b3080aead64bc3a8eab348ede748e6caec9c907.tar.bz2 lumina-0b3080aead64bc3a8eab348ede748e6caec9c907.zip |
Add a better watcher/change fallback for ensuring that no files are removed from teh watcher during a session.
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LSession.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 12d5b831..4e644792 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -341,9 +341,11 @@ void LSession::watcherChange(QString changed){ if(DEBUG){ qDebug() << "New Desktop Files:" << desktopFiles.length(); } emit DesktopFilesChanged(); } - //Now double-check all the watches files to ensure that none of them got removed - - QStringList files = watcher->files(); + //Now ensure this file was not removed from the watcher + if(!watcher->files().contains(changed) && !watcher->directories().contains(changed)){ + watcher->addPath(changed); + } + /*QStringList files = watcher->files(); if(files.length() < 5){ qDebug() << " - Resetting Watched Files..."; watcher->removePaths(files); //clear the current files before re-setting them @@ -352,7 +354,7 @@ void LSession::watcherChange(QString changed){ watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-init" ); watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-keys" ); watcher->addPath( QDir::homePath()+"/Desktop"); - } + }*/ } void LSession::screensChanged(){ |