diff options
Diffstat (limited to 'src/managers/input/IdleInhibitor.cpp')
| -rw-r--r-- | src/managers/input/IdleInhibitor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/managers/input/IdleInhibitor.cpp b/src/managers/input/IdleInhibitor.cpp index 0034a10f..5750080c 100644 --- a/src/managers/input/IdleInhibitor.cpp +++ b/src/managers/input/IdleInhibitor.cpp @@ -40,10 +40,10 @@ void CInputManager::recheckIdleInhibitorStatus() { auto WLSurface = Desktop::View::CWLSurface::fromResource(ii->inhibitor->m_surface.lock()); - if (!WLSurface) + if (!WLSurface || !WLSurface->view()) continue; - if (WLSurface->visible()) { + if (WLSurface->view()->aliveAndVisible()) { PROTO::idle->setInhibit(true); return; } @@ -85,10 +85,10 @@ bool CInputManager::isWindowInhibiting(const PHLWINDOW& w, bool onlyHl) { auto WLSurface = Desktop::View::CWLSurface::fromResource(surf); - if (!WLSurface) + if (!WLSurface || !WLSurface->view()) return; - if (WLSurface->visible()) + if (WLSurface->view()->aliveAndVisible()) *sc<bool*>(data) = true; }, &isInhibiting); |
