mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 05:19:48 +01:00
asyncResourceGatherer: skip processing screenshot paths and remove initThread (#189)
* asyncResourceGatherer: skip processing screenshot paths * asyncResourceGatherer: remove initThread
This commit is contained in:
parent
0fe1028255
commit
9466f59327
2 changed files with 5 additions and 7 deletions
|
@ -10,12 +10,11 @@
|
|||
std::mutex cvmtx;
|
||||
|
||||
CAsyncResourceGatherer::CAsyncResourceGatherer() {
|
||||
initThread = std::thread([this]() {
|
||||
this->gather();
|
||||
this->asyncLoopThread = std::thread([this]() { this->asyncAssetSpinLock(); });
|
||||
this->asyncLoopThread.detach();
|
||||
asyncLoopThread = std::thread([this]() {
|
||||
this->gather(); /* inital gather */
|
||||
this->asyncAssetSpinLock();
|
||||
});
|
||||
initThread.detach();
|
||||
asyncLoopThread.detach();
|
||||
|
||||
// some things can't be done async :(
|
||||
// gather background textures when needed
|
||||
|
@ -128,7 +127,7 @@ void CAsyncResourceGatherer::gather() {
|
|||
|
||||
std::string path = std::any_cast<Hyprlang::STRING>(c.values.at("path"));
|
||||
|
||||
if (path.empty())
|
||||
if (path.empty() || path == "screenshot")
|
||||
continue;
|
||||
|
||||
std::string id = std::string{"background:"} + path;
|
||||
|
|
|
@ -52,7 +52,6 @@ class CAsyncResourceGatherer {
|
|||
void recheckDMAFramesFor(COutput* output);
|
||||
|
||||
private:
|
||||
std::thread initThread;
|
||||
std::thread asyncLoopThread;
|
||||
|
||||
void asyncAssetSpinLock();
|
||||
|
|
Loading…
Reference in a new issue