idle: implement new protocol
This commit is contained in:
parent
9f7382bca4
commit
f8def68e7e
6 changed files with 30 additions and 14 deletions
|
|
@ -42,10 +42,10 @@ void CInputManager::recheckIdleInhibitorStatus() {
|
|||
|
||||
for (auto& ii : m_lIdleInhibitors) {
|
||||
if (!ii.pWindow) {
|
||||
wlr_idle_set_enabled(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat, false);
|
||||
g_pCompositor->setIdleActivityInhibit(false);
|
||||
return;
|
||||
} else if (g_pHyprRenderer->shouldRenderWindow(ii.pWindow)) {
|
||||
wlr_idle_set_enabled(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat, false);
|
||||
g_pCompositor->setIdleActivityInhibit(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -56,21 +56,21 @@ void CInputManager::recheckIdleInhibitorStatus() {
|
|||
continue;
|
||||
|
||||
if (w->m_eIdleInhibitMode == IDLEINHIBIT_ALWAYS) {
|
||||
wlr_idle_set_enabled(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat, false);
|
||||
g_pCompositor->setIdleActivityInhibit(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (w->m_eIdleInhibitMode == IDLEINHIBIT_FOCUS && g_pCompositor->isWindowActive(w.get())) {
|
||||
wlr_idle_set_enabled(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat, false);
|
||||
g_pCompositor->setIdleActivityInhibit(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (w->m_eIdleInhibitMode == IDLEINHIBIT_FULLSCREEN && w->m_bIsFullscreen && g_pCompositor->isWorkspaceVisible(w->m_iWorkspaceID)) {
|
||||
wlr_idle_set_enabled(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat, false);
|
||||
g_pCompositor->setIdleActivityInhibit(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
wlr_idle_set_enabled(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat, true);
|
||||
g_pCompositor->setIdleActivityInhibit(true);
|
||||
return;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue