diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-10-06 09:16:40 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-10-06 09:16:40 +0100 |
| commit | 190ddb5697be20acacbfdcd6014c331deb397e36 (patch) | |
| tree | 654999d9f2e6bebde96fcb51296f1487c679835b /src/managers | |
| parent | 095688712d2a064bb7bfaded3ffc21580e5d338f (diff) | |
added a noanim rule
Diffstat (limited to 'src/managers')
| -rw-r--r-- | src/managers/AnimationManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index 27653766..b79f28bd 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -21,12 +21,12 @@ void CAnimationManager::addBezierWithName(std::string name, const Vector2D& p1, void CAnimationManager::tick() { - bool animationsDisabled = false; + bool animGlobalDisabled = false; static auto *const PANIMENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue; if (!*PANIMENABLED) - animationsDisabled = true; + animGlobalDisabled = true; static auto *const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue; static auto *const PSHADOWSENABLED = &g_pConfigManager->getConfigValuePtr("decoration:drop_shadow")->intValue; @@ -56,11 +56,13 @@ void CAnimationManager::tick() { const auto PWORKSPACE = (CWorkspace*)av->m_pWorkspace; const auto PLAYER = (SLayerSurface*)av->m_pLayer; CMonitor* PMONITOR = nullptr; + bool animationsDisabled = animGlobalDisabled; wlr_box WLRBOXPREV = {0,0,0,0}; if (PWINDOW) { WLRBOXPREV = PWINDOW->getFullWindowBoundingBox(); PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID); + animationsDisabled = animationsDisabled || PWINDOW->m_sAdditionalConfigData.forceNoAnims; } else if (PWORKSPACE) { PMONITOR = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID); WLRBOXPREV = {(int)PMONITOR->vecPosition.x, (int)PMONITOR->vecPosition.y, (int)PMONITOR->vecSize.x, (int)PMONITOR->vecSize.y}; |
