Skip to content

Commit

Permalink
fixed contain parameter handling in "handleReload"
Browse files Browse the repository at this point in the history
  • Loading branch information
barrrguzin committed May 25, 2024
1 parent da89158 commit fdfbaac
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ static Hyprlang::CParseResult handleReload(const char* C, const char* V) {

auto WALLPAPER = g_pConfigManager->trimPath(VALUE.substr(VALUE.find_first_of(',') + 1));

if (WALLPAPER.find("contain:") == 0) {
WALLPAPER = WALLPAPER.substr(8);
}

auto preloadResult = handlePreload(C, WALLPAPER.c_str());
if (preloadResult.error)
return preloadResult;

auto wallpaperResult = handleWallpaper(C, V);
if (wallpaperResult.error)
return wallpaperResult;

auto MONITOR = VALUE.substr(0, VALUE.find_first_of(','));

if (MONITOR.empty()) {
Expand All @@ -150,6 +150,10 @@ static Hyprlang::CParseResult handleReload(const char* C, const char* V) {
g_pHyprpaper->unloadWallpaper(OLD_WALLPAPER);
}

auto wallpaperResult = handleWallpaper(C, V);
if (wallpaperResult.error)
return wallpaperResult;

return Hyprlang::CParseResult{};
}

Expand Down

0 comments on commit fdfbaac

Please sign in to comment.