desktop/view: use aliveAndVisible for most things (#12631)
This commit is contained in:
parent
2ca7ad7efc
commit
5dd224805d
10 changed files with 35 additions and 28 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue