2025-12-08 15:04:40 +00:00
|
|
|
#include "View.hpp"
|
2025-12-11 16:29:26 +00:00
|
|
|
#include "../../protocols/core/Compositor.hpp"
|
2025-12-08 15:04:40 +00:00
|
|
|
|
|
|
|
|
using namespace Desktop;
|
|
|
|
|
using namespace Desktop::View;
|
|
|
|
|
|
|
|
|
|
SP<Desktop::View::CWLSurface> IView::wlSurface() const {
|
|
|
|
|
return m_wlSurface;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IView::IView(SP<Desktop::View::CWLSurface> pWlSurface) : m_wlSurface(pWlSurface) {
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SP<CWLSurfaceResource> IView::resource() const {
|
|
|
|
|
return m_wlSurface ? m_wlSurface->resource() : nullptr;
|
|
|
|
|
}
|
2025-12-11 16:29:26 +00:00
|
|
|
|
|
|
|
|
bool IView::aliveAndVisible() const {
|
|
|
|
|
auto res = resource();
|
|
|
|
|
if (!res)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (!res->m_mapped)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return visible();
|
|
|
|
|
}
|