summaryrefslogtreecommitdiff
path: root/src/desktop/view/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop/view/Window.cpp')
-rw-r--r--src/desktop/view/Window.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp
index b01dcabc..2fc15566 100644
--- a/src/desktop/view/Window.cpp
+++ b/src/desktop/view/Window.cpp
@@ -639,14 +639,13 @@ void CWindow::onMap() {
}
void CWindow::onBorderAngleAnimEnd(WP<CBaseAnimatedVariable> pav) {
- const auto PAV = pav.lock();
- if (!PAV)
+ if (!pav)
return;
- if (PAV->getStyle() != "loop" || !PAV->enabled())
+ if (pav->getStyle() != "loop" || !pav->enabled())
return;
- const auto PANIMVAR = dc<CAnimatedVariable<float>*>(PAV.get());
+ const auto PANIMVAR = dc<CAnimatedVariable<float>*>(pav.get());
PANIMVAR->setCallbackOnEnd(nullptr); // we remove the callback here because otherwise setvalueandwarp will recurse this
@@ -1912,16 +1911,14 @@ std::optional<Vector2D> CWindow::calculateExpression(const std::string& s) {
}
static void setVector2DAnimToMove(WP<CBaseAnimatedVariable> pav) {
- const auto PAV = pav.lock();
- if (!PAV)
+ if (!pav)
return;
- CAnimatedVariable<Vector2D>* animvar = dc<CAnimatedVariable<Vector2D>*>(PAV.get());
+ CAnimatedVariable<Vector2D>* animvar = dc<CAnimatedVariable<Vector2D>*>(pav.get());
animvar->setConfig(g_pConfigManager->getAnimationPropertyConfig("windowsMove"));
- const auto PHLWINDOW = animvar->m_Context.pWindow.lock();
- if (PHLWINDOW)
- PHLWINDOW->m_animatingIn = false;
+ if (animvar->m_Context.pWindow)
+ animvar->m_Context.pWindow->m_animatingIn = false;
}
void CWindow::mapWindow() {