From 5dd224805deb437f6fa83359ee66a4d0f52262d2 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:29:26 +0000 Subject: desktop/view: use aliveAndVisible for most things (#12631) --- src/desktop/view/WLSurface.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/desktop/view/WLSurface.cpp') diff --git a/src/desktop/view/WLSurface.cpp b/src/desktop/view/WLSurface.cpp index 1bf90ae8..8c3ce9db 100644 --- a/src/desktop/view/WLSurface.cpp +++ b/src/desktop/view/WLSurface.cpp @@ -38,7 +38,7 @@ SP CWLSurface::resource() const { } bool CWLSurface::small() const { - if (!m_view || !m_view->visible() || m_view->type() != VIEW_TYPE_WINDOW || !exists()) + if (!m_view || !m_view->aliveAndVisible() || m_view->type() != VIEW_TYPE_WINDOW || !exists()) return false; if (!m_resource->m_current.texture) @@ -51,7 +51,7 @@ bool CWLSurface::small() const { } Vector2D CWLSurface::correctSmallVec() const { - if (!m_view || !m_view->visible() || m_view->type() != VIEW_TYPE_WINDOW || !exists() || !small() || !m_fillIgnoreSmall) + if (!m_view || !m_view->aliveAndVisible() || m_view->type() != VIEW_TYPE_WINDOW || !exists() || !small() || !m_fillIgnoreSmall) return {}; const auto SIZE = getViewporterCorrectedSize(); @@ -171,12 +171,6 @@ SP CWLSurface::constraint() const { return m_constraint.lock(); } -bool CWLSurface::visible() { - if (m_view) - return m_view->visible(); - return true; // non-desktop, we don't know much. -} - SP CWLSurface::fromResource(SP pSurface) { if (!pSurface) return nullptr; -- cgit v1.2.3