From 3293f37662a79077640b02609059fee27a44539d Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 27 Nov 2022 12:02:09 +0000 Subject: [PATCH] fix unload all --- src/config/ConfigManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index cd468e6..7e06579 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -112,11 +112,6 @@ void CConfigManager::parseKeyword(const std::string& COMMAND, const std::string& } void CConfigManager::handleWallpaper(const std::string& COMMAND, const std::string& VALUE) { - if (VALUE == "all") { - handleUnloadAll(COMMAND, VALUE); - return; - } - if (VALUE.find_first_of(',') == std::string::npos) { parseError = "wallpaper failed (syntax)"; return; @@ -171,6 +166,11 @@ void CConfigManager::handlePreload(const std::string& COMMAND, const std::string void CConfigManager::handleUnload(const std::string& COMMAND, const std::string& VALUE) { auto WALLPAPER = VALUE; + if (VALUE == "all") { + handleUnloadAll(COMMAND, VALUE); + return; + } + if (WALLPAPER[0] == '~') { static const char* const ENVHOME = getenv("HOME"); WALLPAPER = std::string(ENVHOME) + WALLPAPER.substr(1);