mirror of
https://github.com/hyprwm/hypridle.git
synced 2024-12-22 13:39:47 +01:00
idle: ignore if inhibit locked
This commit is contained in:
parent
f6dd1ef9d6
commit
afcef912d6
1 changed files with 10 additions and 0 deletions
|
@ -258,6 +258,11 @@ static void spawn(const std::string& args) {
|
||||||
void CHypridle::onIdled(SIdleListener* pListener) {
|
void CHypridle::onIdled(SIdleListener* pListener) {
|
||||||
Debug::log(LOG, "Idled: rule {:x}", (uintptr_t)pListener);
|
Debug::log(LOG, "Idled: rule {:x}", (uintptr_t)pListener);
|
||||||
|
|
||||||
|
if (g_pHypridle->m_iInhibitLocks > 0) {
|
||||||
|
Debug::log(LOG, "Ignoring, inhibit locks: {}", g_pHypridle->m_iInhibitLocks);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pListener->onTimeout.empty()) {
|
if (pListener->onTimeout.empty()) {
|
||||||
Debug::log(LOG, "Ignoring, onTimeout is empty.");
|
Debug::log(LOG, "Ignoring, onTimeout is empty.");
|
||||||
return;
|
return;
|
||||||
|
@ -270,6 +275,11 @@ void CHypridle::onIdled(SIdleListener* pListener) {
|
||||||
void CHypridle::onResumed(SIdleListener* pListener) {
|
void CHypridle::onResumed(SIdleListener* pListener) {
|
||||||
Debug::log(LOG, "Resumed: rule {:x}", (uintptr_t)pListener);
|
Debug::log(LOG, "Resumed: rule {:x}", (uintptr_t)pListener);
|
||||||
|
|
||||||
|
if (g_pHypridle->m_iInhibitLocks > 0) {
|
||||||
|
Debug::log(LOG, "Ignoring, inhibit locks: {}", g_pHypridle->m_iInhibitLocks);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pListener->onRestore.empty()) {
|
if (pListener->onRestore.empty()) {
|
||||||
Debug::log(LOG, "Ignoring, onRestore is empty.");
|
Debug::log(LOG, "Ignoring, onRestore is empty.");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue