core: don't restore on terminate

This commit is contained in:
Vaxry 2024-03-06 00:00:58 +00:00
parent 7d5cb1dbb3
commit cdb8e7774f

View file

@ -886,6 +886,9 @@ zwlr_screencopy_manager_v1* CHyprlock::getScreencopy() {
} }
void CHyprlock::attemptRestoreOnDeath() { void CHyprlock::attemptRestoreOnDeath() {
if (m_bTerminate)
return;
// dirty hack // dirty hack
uint64_t timeNowMs = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - std::chrono::system_clock::from_time_t({0})).count(); uint64_t timeNowMs = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - std::chrono::system_clock::from_time_t({0})).count();