diff options
Diffstat (limited to 'src/desktop/view/View.cpp')
| -rw-r--r-- | src/desktop/view/View.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/desktop/view/View.cpp b/src/desktop/view/View.cpp index e7c6ce3a..17a10c64 100644 --- a/src/desktop/view/View.cpp +++ b/src/desktop/view/View.cpp @@ -1,4 +1,5 @@ #include "View.hpp" +#include "../../protocols/core/Compositor.hpp" using namespace Desktop; using namespace Desktop::View; @@ -14,3 +15,14 @@ IView::IView(SP<Desktop::View::CWLSurface> pWlSurface) : m_wlSurface(pWlSurface) SP<CWLSurfaceResource> IView::resource() const { return m_wlSurface ? m_wlSurface->resource() : nullptr; } + +bool IView::aliveAndVisible() const { + auto res = resource(); + if (!res) + return false; + + if (!res->m_mapped) + return false; + + return visible(); +} |
