From 745b998587fc39db6e3f77caa54074da618cd509 Mon Sep 17 00:00:00 2001 From: Xavier Date: Fri, 24 Nov 2023 22:45:59 +0100 Subject: [PATCH] renderer: Adding an option to disable first launch animation (#3933) --- src/config/ConfigManager.cpp | 3 ++- src/render/Renderer.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 9f739ce0..63aaa751 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -209,7 +209,8 @@ void CConfigManager::setDefaultVars() { configValues["master:smart_resizing"].intValue = 1; configValues["master:drop_at_cursor"].intValue = 1; - configValues["animations:enabled"].intValue = 1; + configValues["animations:enabled"].intValue = 1; + configValues["animations:first_launch_animation"].intValue = 1; configValues["input:follow_mouse"].intValue = 1; configValues["input:mouse_refocus"].intValue = 1; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 21517703..bc71978b 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -877,6 +877,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { static auto* const PRENDERTEX = &g_pConfigManager->getConfigValuePtr("misc:disable_hyprland_logo")->intValue; static auto* const PBACKGROUNDCOLOR = &g_pConfigManager->getConfigValuePtr("misc:background_color")->intValue; static auto* const PANIMENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue; + static auto* const PFIRSTLAUNCHANIM = &g_pConfigManager->getConfigValuePtr("animations:first_launch_animation")->intValue; static auto* const PTEARINGENABLED = &g_pConfigManager->getConfigValuePtr("general:allow_tearing")->intValue; static int damageBlinkCleanup = 0; // because double-buffered @@ -885,7 +886,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { damageBlinkCleanup = 0; static bool firstLaunch = true; - static bool firstLaunchAnimActive = true; + static bool firstLaunchAnimActive = *PFIRSTLAUNCHANIM; float zoomInFactorFirstLaunch = 1.f;