layers: refactor class member vars (#10149)

* layers: refactor class member vars

* popups: rename m_WLSurface to m_wlSurface
This commit is contained in:
davc0n 2025-04-24 20:49:49 +02:00 committed by GitHub
parent be6268a7ec
commit 0e80ecc534
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 487 additions and 484 deletions

View file

@ -190,7 +190,7 @@ std::optional<CBox> CWLSurface::getSurfaceBoxGlobal() const {
if (!m_pWindowOwner.expired())
return m_pWindowOwner->getWindowMainSurfaceBox();
if (!m_pLayerOwner.expired())
return m_pLayerOwner->geometry;
return m_pLayerOwner->m_geometry;
if (m_pPopupOwner)
return CBox{m_pPopupOwner->coordsGlobal(), m_pPopupOwner->size()};
if (m_pSubsurfaceOwner)
@ -228,7 +228,7 @@ SP<CWLSurface> CWLSurface::fromResource(SP<CWLSurfaceResource> pSurface) {
bool CWLSurface::keyboardFocusable() const {
if (m_pWindowOwner || m_pPopupOwner || m_pSubsurfaceOwner)
return true;
if (m_pLayerOwner && m_pLayerOwner->layerSurface)
return m_pLayerOwner->layerSurface->current.interactivity != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE;
if (m_pLayerOwner && m_pLayerOwner->m_layerSurface)
return m_pLayerOwner->m_layerSurface->current.interactivity != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE;
return false;
}