workspaces: refactor class member vars (#10167)
This commit is contained in:
parent
0e80ecc534
commit
02d7badd15
37 changed files with 687 additions and 688 deletions
|
|
@ -33,9 +33,9 @@ void CAlphaModifier::setResource(SP<CWpAlphaModifierSurfaceV1> resource) {
|
|||
listeners.surfaceCommitted = m_pSurface->events.commit.registerListener([this](std::any data) {
|
||||
auto surface = CWLSurface::fromResource(m_pSurface.lock());
|
||||
|
||||
if (surface && surface->m_fAlphaModifier != m_fAlpha) {
|
||||
surface->m_fAlphaModifier = m_fAlpha;
|
||||
auto box = surface->getSurfaceBoxGlobal();
|
||||
if (surface && surface->m_alphaModifier != m_fAlpha) {
|
||||
surface->m_alphaModifier = m_fAlpha;
|
||||
auto box = surface->getSurfaceBoxGlobal();
|
||||
|
||||
if (box.has_value())
|
||||
g_pHyprRenderer->damageBox(*box);
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ void CHyprlandSurface::setResource(SP<CHyprlandSurfaceV1> resource) {
|
|||
listeners.surfaceCommitted = m_pSurface->events.commit.registerListener([this](std::any data) {
|
||||
auto surface = CWLSurface::fromResource(m_pSurface.lock());
|
||||
|
||||
if (surface && (surface->m_fOverallOpacity != m_fOpacity || m_bVisibleRegionChanged)) {
|
||||
surface->m_fOverallOpacity = m_fOpacity;
|
||||
surface->m_visibleRegion = m_visibleRegion;
|
||||
auto box = surface->getSurfaceBoxGlobal();
|
||||
if (surface && (surface->m_overallOpacity != m_fOpacity || m_bVisibleRegionChanged)) {
|
||||
surface->m_overallOpacity = m_fOpacity;
|
||||
surface->m_visibleRegion = m_visibleRegion;
|
||||
auto box = surface->getSurfaceBoxGlobal();
|
||||
|
||||
if (box.has_value())
|
||||
g_pHyprRenderer->damageBox(*box);
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ CPointerConstraint::~CPointerConstraint() {
|
|||
});
|
||||
|
||||
if (pHLSurface)
|
||||
pHLSurface->m_pConstraint.reset();
|
||||
pHLSurface->m_constraint.reset();
|
||||
}
|
||||
|
||||
void CPointerConstraint::sharedConstructions() {
|
||||
if (pHLSurface) {
|
||||
listeners.destroySurface = pHLSurface->events.destroy.registerListener([this](std::any d) {
|
||||
listeners.destroySurface = pHLSurface->m_events.destroy.registerListener([this](std::any d) {
|
||||
pHLSurface.reset();
|
||||
if (active)
|
||||
deactivate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue