summaryrefslogtreecommitdiff
path: root/src/desktop/view/WLSurface.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-12-11 16:29:26 +0000
committerGitHub <noreply@github.com>2025-12-11 16:29:26 +0000
commit5dd224805deb437f6fa83359ee66a4d0f52262d2 (patch)
tree9a5b2466a9cbbeaa03c8e3876fe103e18aad8794 /src/desktop/view/WLSurface.cpp
parent2ca7ad7efc1e20588af5c823ee46f23afad6cf91 (diff)
desktop/view: use aliveAndVisible for most things (#12631)
Diffstat (limited to 'src/desktop/view/WLSurface.cpp')
-rw-r--r--src/desktop/view/WLSurface.cpp10
1 files changed, 2 insertions, 8 deletions
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<CWLSurfaceResource> 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<CPointerConstraint> 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<Desktop::View::CWLSurface> CWLSurface::fromResource(SP<CWLSurfaceResource> pSurface) {
if (!pSurface)
return nullptr;