diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-06-11 17:52:16 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-06-11 17:52:23 +0200 |
| commit | 412c7dc7f79cb6b04af41692504e82d4417e6e13 (patch) | |
| tree | 6515bfadb5fbaae3365a9fc2ffedcab05f8277c3 /src/helpers | |
| parent | 8329de1ab530782aa3e45228632fce3b46fbf183 (diff) | |
renderer: fixup some missing fadeout cases with special
fixes some fadeout missing cases:
- closing last window
- closing above fs
- closing in general
fixes #10283
Diffstat (limited to 'src/helpers')
| -rw-r--r-- | src/helpers/Monitor.cpp | 7 | ||||
| -rw-r--r-- | src/helpers/Monitor.hpp | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index f2dc2e8c..44ac1dcf 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -21,6 +21,7 @@ #include "../render/Renderer.hpp" #include "../managers/EventManager.hpp" #include "../managers/LayoutManager.hpp" +#include "../managers/AnimationManager.hpp" #include "../managers/input/InputManager.hpp" #include "sync/SyncTimeline.hpp" #include "time/Time.hpp" @@ -47,7 +48,8 @@ static int ratHandler(void* data) { } CMonitor::CMonitor(SP<Aquamarine::IOutput> output_) : m_state(this), m_output(output_) { - ; + g_pAnimationManager->createAnimation(0.f, m_specialFade, g_pConfigManager->getAnimationPropertyConfig("specialWorkspaceIn"), AVARDAMAGE_NONE); + m_specialFade->setUpdateCallback([this](auto) { g_pHyprRenderer->damageMonitor(m_self.lock()); }); } CMonitor::~CMonitor() { @@ -1222,6 +1224,9 @@ void CMonitor::setSpecialWorkspace(const PHLWORKSPACE& pWorkspace) { if (m_activeSpecialWorkspace == pWorkspace) return; + m_specialFade->setConfig(g_pConfigManager->getAnimationPropertyConfig(pWorkspace ? "specialWorkspaceIn" : "specialWorkspaceOut")); + *m_specialFade = pWorkspace ? 1.F : 0.F; + g_pHyprRenderer->damageMonitor(m_self.lock()); if (!pWorkspace) { diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index e495cf04..4dc4ad88 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -7,6 +7,7 @@ #include "MiscFunctions.hpp" #include "WLClasses.hpp" #include <array> +#include "AnimatedVariable.hpp" #include <xf86drmMode.h> #include "time/Timer.hpp" @@ -161,6 +162,9 @@ class CMonitor { PHLWINDOWREF m_lastScanout; bool m_scanoutNeedsCursorUpdate = false; + // for special fade/blur + PHLANIMVAR<float> m_specialFade; + struct { bool canTear = false; bool nextRenderTorn = false; |
