Skip to content

Commit 1380ca0

Browse files
background: unload screenshots when monitor is removed
This is just for testing as of now. No merging.
1 parent 61b36c6 commit 1380ca0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/renderer/widgets/Background.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "../../helpers/MiscFunctions.hpp"
88
#include "../../core/AnimationManager.hpp"
99
#include "../../config/ConfigManager.hpp"
10+
#include "src/renderer/AsyncResourceGatherer.hpp"
1011
#include <chrono>
1112
#include <hyprlang.hpp>
1213
#include <filesystem>
@@ -89,6 +90,9 @@ void CBackground::reset() {
8990
reloadTimer.reset();
9091
}
9192

93+
if (g_pAsyncResourceGatherer && scAsset)
94+
g_pAsyncResourceGatherer->unloadAsset(scAsset);
95+
9296
blurredFB->destroyBuffer();
9397
pendingBlurredFB->destroyBuffer();
9498
}

0 commit comments

Comments
 (0)