diff --git a/hyprland-git/dynamicPointerCast.patch b/hyprland-git/dynamicPointerCast.patch index 01bad9b..be266c3 100644 --- a/hyprland-git/dynamicPointerCast.patch +++ b/hyprland-git/dynamicPointerCast.patch @@ -1,5 +1,5 @@ diff --git a/src/Compositor.cpp b/src/Compositor.cpp -index 0d9c2f8..3bcaace 100644 +index 0d9c2f8..6b966c9 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -79,6 +79,7 @@ @@ -15,7 +15,7 @@ index 0d9c2f8..3bcaace 100644 return nullptr; - return dynamicPointerCast(VIEW); -+ return std::dynamicPointerCast(VIEW); ++ return std::dynamic_pointer_cast(VIEW); } PHLWINDOW CCompositor::getWindowFromHandle(uint32_t handle) { @@ -32,7 +32,7 @@ index 3192321..e71163b 100644 using namespace Desktop; using namespace Desktop::View; diff --git a/src/desktop/view/Popup.cpp b/src/desktop/view/Popup.cpp -index 31ea125..07e6b67 100644 +index 31ea125..a47f2d0 100644 --- a/src/desktop/view/Popup.cpp +++ b/src/desktop/view/Popup.cpp @@ -12,6 +12,7 @@ @@ -43,8 +43,17 @@ index 31ea125..07e6b67 100644 using namespace Desktop; using namespace Desktop::View; +@@ -51,7 +52,7 @@ SP CPopup::create(SP resource, WP pOwner) { + SP CPopup::fromView(SP v) { + if (!v || v->type() != VIEW_TYPE_POPUP) + return nullptr; +- return dynamicPointerCast(v); ++ return std::dynamic_pointer_cast(v); + } + + CPopup::CPopup() : IView(CWLSurface::create()) { diff --git a/src/desktop/view/SessionLock.cpp b/src/desktop/view/SessionLock.cpp -index a4a5b78..b3747b0 100644 +index a4a5b78..a949288 100644 --- a/src/desktop/view/SessionLock.cpp +++ b/src/desktop/view/SessionLock.cpp @@ -6,6 +6,8 @@ @@ -61,12 +70,12 @@ index a4a5b78..b3747b0 100644 if (!v || v->type() != VIEW_TYPE_LOCK_SCREEN) return nullptr; - return dynamicPointerCast(v); -+ return std::dynamicPointerCast(v); ++ return std::dynamic_pointer_cast(v); } eViewType View::CSessionLock::type() const { diff --git a/src/desktop/view/Subsurface.cpp b/src/desktop/view/Subsurface.cpp -index 2c39a08..2a90717 100644 +index 2c39a08..9fe4369 100644 --- a/src/desktop/view/Subsurface.cpp +++ b/src/desktop/view/Subsurface.cpp @@ -6,6 +6,7 @@ @@ -77,8 +86,17 @@ index 2c39a08..2a90717 100644 using namespace Desktop; using namespace Desktop::View; +@@ -56,7 +57,7 @@ SP CSubsurface::create(SP pSubsurface, WP CSubsurface::fromView(SP v) { + if (!v || v->type() != VIEW_TYPE_SUBSURFACE) + return nullptr; +- return dynamicPointerCast(v); ++ return dynamic_pointer_cast(v); + } + + CSubsurface::CSubsurface() : IView(CWLSurface::create()) { diff --git a/src/desktop/view/WLSurface.cpp b/src/desktop/view/WLSurface.cpp -index 1bf90ae..c6bd048 100644 +index 1bf90ae..f7772df 100644 --- a/src/desktop/view/WLSurface.cpp +++ b/src/desktop/view/WLSurface.cpp @@ -4,6 +4,7 @@ @@ -94,7 +112,7 @@ index 1bf90ae..c6bd048 100644 return false; - const auto O = dynamicPointerCast(m_view.lock()); -+ const auto O = std::dynamicPointerCast(m_view.lock()); ++ const auto O = std::dynamic_pointer_cast(m_view.lock()); const auto REPORTED_SIZE = O->getReportedSize(); return REPORTED_SIZE.x > m_resource->m_current.size.x + 1 || REPORTED_SIZE.y > m_resource->m_current.size.y + 1; @@ -103,7 +121,7 @@ index 1bf90ae..c6bd048 100644 const auto SIZE = getViewporterCorrectedSize(); - const auto O = dynamicPointerCast(m_view.lock()); -+ const auto O = std::dynamicPointerCast(m_view.lock()); ++ const auto O = std::dynamic_pointer_cast(m_view.lock()); const auto REP = O->getReportedSize(); return Vector2D{(REP.x - SIZE.x) / 2, (REP.y - SIZE.y) / 2}.clamp({}, {INFINITY, INFINITY}) * (O->m_realSize->value() / REP); @@ -112,12 +130,12 @@ index 1bf90ae..c6bd048 100644 if (BOX.has_value()) { if (m_view->type() == VIEW_TYPE_WINDOW) - damage.intersect(CBox{{}, BOX->size() * dynamicPointerCast(m_view.lock())->m_X11SurfaceScaledBy}); -+ damage.intersect(CBox{{}, BOX->size() * std::dynamicPointerCast(m_view.lock())->m_X11SurfaceScaledBy}); ++ damage.intersect(CBox{{}, BOX->size() * std::dynamic_pointer_cast(m_view.lock())->m_X11SurfaceScaledBy}); else damage.intersect(CBox{{}, BOX->size()}); } diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp -index e27129a..e50019e 100644 +index e27129a..f433a40 100644 --- a/src/desktop/view/Window.cpp +++ b/src/desktop/view/Window.cpp @@ -43,6 +43,7 @@ @@ -128,8 +146,17 @@ index e27129a..e50019e 100644 using namespace Hyprutils::String; using namespace Hyprutils::Animation; +@@ -131,7 +132,7 @@ CWindow::CWindow(SP surface) : IView(CWLSurface::create()), m_ + SP CWindow::fromView(SP v) { + if (!v || v->type() != VIEW_TYPE_WINDOW) + return nullptr; +- return dynamicPointerCast(v); ++ return dynamic_pointer_cast(v); + } + + CWindow::~CWindow() { diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp -index 98662d1..e24046a 100644 +index 98662d1..d0d2f87 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -48,6 +48,7 @@ @@ -145,11 +172,11 @@ index 98662d1..e24046a 100644 if (BOX) { - const auto PWINDOW = HLSurface->view()->type() == Desktop::View::VIEW_TYPE_WINDOW ? dynamicPointerCast(HLSurface->view()) : nullptr; -+ const auto PWINDOW = HLSurface->view()->type() == Desktop::View::VIEW_TYPE_WINDOW ? std::dynamicPointerCast(HLSurface->view()) : nullptr; ++ const auto PWINDOW = HLSurface->view()->type() == Desktop::View::VIEW_TYPE_WINDOW ? std::dynamic_pointer_cast(HLSurface->view()) : nullptr; surfacePos = BOX->pos(); pFoundLayerSurface = - HLSurface->view()->type() == Desktop::View::VIEW_TYPE_LAYER_SURFACE ? dynamicPointerCast(HLSurface->view()) : nullptr; -+ HLSurface->view()->type() == Desktop::View::VIEW_TYPE_LAYER_SURFACE ? std::dynamicPointerCast(HLSurface->view()) : nullptr; ++ HLSurface->view()->type() == Desktop::View::VIEW_TYPE_LAYER_SURFACE ? std::dynamic_pointer_cast(HLSurface->view()) : nullptr; if (!pFoundLayerSurface) pFoundWindow = !PWINDOW || PWINDOW->isHidden() ? Desktop::focusState()->window() : PWINDOW; } else // reset foundSurface, find one normally @@ -158,7 +185,7 @@ index 98662d1..e24046a 100644 if (HLSurf && HLSurf->view()->type() == Desktop::View::VIEW_TYPE_WINDOW) - g_pCompositor->changeWindowZOrder(dynamicPointerCast(HLSurf->view()), true); -+ g_pCompositor->changeWindowZOrder(std::dynamicPointerCast(HLSurf->view()), true); ++ g_pCompositor->changeWindowZOrder(std::dynamic_pointer_cast(HLSurf->view()), true); break; }