mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:06:00 +01:00
launchanim: fix #2291
This commit is contained in:
parent
5bfd5a9240
commit
f877d68f4f
1 changed files with 5 additions and 2 deletions
|
@ -791,7 +791,8 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
||||||
if (!*PDAMAGEBLINK)
|
if (!*PDAMAGEBLINK)
|
||||||
damageBlinkCleanup = 0;
|
damageBlinkCleanup = 0;
|
||||||
|
|
||||||
static bool firstLaunch = true;
|
static bool firstLaunch = true;
|
||||||
|
static bool firstLaunchAnimActive = true;
|
||||||
|
|
||||||
float zoomInFactorFirstLaunch = 1.f;
|
float zoomInFactorFirstLaunch = 1.f;
|
||||||
|
|
||||||
|
@ -800,9 +801,11 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
||||||
m_tRenderTimer.reset();
|
m_tRenderTimer.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_tRenderTimer.getSeconds() < 1.5f) { // TODO: make the animation system more damage-flexible so that this can be migrated to there
|
if (m_tRenderTimer.getSeconds() < 1.5f && firstLaunchAnimActive) { // TODO: make the animation system more damage-flexible so that this can be migrated to there
|
||||||
zoomInFactorFirstLaunch = 2.f - g_pAnimationManager->getBezier("default")->getYForPoint(m_tRenderTimer.getSeconds() / 1.5);
|
zoomInFactorFirstLaunch = 2.f - g_pAnimationManager->getBezier("default")->getYForPoint(m_tRenderTimer.getSeconds() / 1.5);
|
||||||
damageMonitor(pMonitor);
|
damageMonitor(pMonitor);
|
||||||
|
} else {
|
||||||
|
firstLaunchAnimActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
startRender = std::chrono::high_resolution_clock::now();
|
startRender = std::chrono::high_resolution_clock::now();
|
||||||
|
|
Loading…
Reference in a new issue