summaryrefslogtreecommitdiff
path: root/src/protocols/core/Subcompositor.cpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-08-14 19:44:56 +0500
committerGitHub <noreply@github.com>2025-08-14 15:44:56 +0100
commitbeee22a95ed9044950e5486f22edd813e00ffa2c (patch)
tree4612fa3d9b17275d417a059c19f998c64e871997 /src/protocols/core/Subcompositor.cpp
parentaa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff)
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'src/protocols/core/Subcompositor.cpp')
-rw-r--r--src/protocols/core/Subcompositor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocols/core/Subcompositor.cpp b/src/protocols/core/Subcompositor.cpp
index a8873390..c198052c 100644
--- a/src/protocols/core/Subcompositor.cpp
+++ b/src/protocols/core/Subcompositor.cpp
@@ -116,7 +116,7 @@ Vector2D CWLSubsurfaceResource::posRelativeToParent() {
while (surf->m_role->role() == SURFACE_ROLE_SUBSURFACE && std::ranges::find_if(surfacesVisited, [surf](const auto& other) { return surf == other; }) == surfacesVisited.end()) {
surfacesVisited.emplace_back(surf);
- auto subsurface = ((CSubsurfaceRole*)m_parent->m_role.get())->m_subsurface.lock();
+ auto subsurface = sc<CSubsurfaceRole*>(m_parent->m_role.get())->m_subsurface.lock();
pos += subsurface->m_position;
surf = subsurface->m_parent.lock();
}
@@ -133,7 +133,7 @@ SP<CWLSurfaceResource> CWLSubsurfaceResource::t1Parent() {
while (surf->m_role->role() == SURFACE_ROLE_SUBSURFACE && std::ranges::find_if(surfacesVisited, [surf](const auto& other) { return surf == other; }) == surfacesVisited.end()) {
surfacesVisited.emplace_back(surf);
- auto subsurface = ((CSubsurfaceRole*)m_parent->m_role.get())->m_subsurface.lock();
+ auto subsurface = sc<CSubsurfaceRole*>(m_parent->m_role.get())->m_subsurface.lock();
surf = subsurface->m_parent.lock();
}
return surf;
@@ -163,7 +163,7 @@ CWLSubcompositorResource::CWLSubcompositorResource(SP<CWlSubcompositor> resource
SP<CWLSurfaceResource> t1Parent = nullptr;
if (PARENT->m_role->role() == SURFACE_ROLE_SUBSURFACE) {
- auto subsurface = ((CSubsurfaceRole*)PARENT->m_role.get())->m_subsurface.lock();
+ auto subsurface = sc<CSubsurfaceRole*>(PARENT->m_role.get())->m_subsurface.lock();
t1Parent = subsurface->t1Parent();
} else
t1Parent = PARENT;