core: make unload all do what it says

This commit is contained in:
Vaxry 2024-02-27 21:44:07 +00:00
parent dfd3d090dc
commit 79765e1bdf

View file

@ -89,18 +89,6 @@ static Hyprlang::CParseResult handleUnloadAll(const char* C, const char* V) {
std::vector<std::string> toUnload; std::vector<std::string> toUnload;
for (auto& [name, target] : g_pHyprpaper->m_mWallpaperTargets) { for (auto& [name, target] : g_pHyprpaper->m_mWallpaperTargets) {
bool exists = false;
for (auto& [mon, target2] : g_pHyprpaper->m_mMonitorActiveWallpaperTargets) {
if (&target == target2) {
exists = true;
break;
}
}
if (exists)
continue;
toUnload.emplace_back(name); toUnload.emplace_back(name);
} }