summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-02-29 15:07:11 +0000
committerVaxry <vaxry@vaxry.net>2024-02-29 15:07:14 +0000
commit6916d0a6a316d602ff766abe5abffacf929b6801 (patch)
tree42a3008a1cc8925dd97ce3045f2715ae56bc22c9 /src/render/Renderer.cpp
parentbcec082a1c20da4b69d56b0f0f98e00ecb3b5c96 (diff)
surface: unify owners
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 4ffdecb4..fd1c3434 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -70,7 +70,7 @@ static void renderSurface(struct wlr_surface* surface, int x, int y, void* data)
// however, if surface buffer w / h < box, we need to adjust them
auto* const PSURFACE = CWLSurface::surfaceFromWlr(surface);
- if (PSURFACE && !PSURFACE->m_bFillIgnoreSmall && PSURFACE->small() /* guarantees m_pOwner */) {
+ if (PSURFACE && !PSURFACE->m_bFillIgnoreSmall && PSURFACE->small() /* guarantees m_pWindowOwner */) {
const auto CORRECT = PSURFACE->correctSmallVec();
const auto SIZE = PSURFACE->getViewporterCorrectedSize();
@@ -78,8 +78,8 @@ static void renderSurface(struct wlr_surface* surface, int x, int y, void* data)
windowBox.x += CORRECT.x;
windowBox.y += CORRECT.y;
- windowBox.width = SIZE.x * (PSURFACE->m_pOwner->m_vRealSize.vec().x / PSURFACE->m_pOwner->m_vReportedSize.x);
- windowBox.height = SIZE.y * (PSURFACE->m_pOwner->m_vRealSize.vec().y / PSURFACE->m_pOwner->m_vReportedSize.y);
+ windowBox.width = SIZE.x * (PSURFACE->getWindow()->m_vRealSize.vec().x / PSURFACE->getWindow()->m_vReportedSize.x);
+ windowBox.height = SIZE.y * (PSURFACE->getWindow()->m_vRealSize.vec().y / PSURFACE->getWindow()->m_vReportedSize.y);
} else {
windowBox.width = SIZE.x;
windowBox.height = SIZE.y;
@@ -1590,7 +1590,7 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y, dou
return;
auto* const PSURFACE = CWLSurface::surfaceFromWlr(pSurface);
- if (PSURFACE && PSURFACE->m_pOwner && PSURFACE->small()) {
+ if (PSURFACE && PSURFACE->small()) {
const auto CORRECTION = PSURFACE->correctSmallVec();
x += CORRECTION.x;
y += CORRECTION.y;