added a specialWorkspace anim leaf

This commit is contained in:
vaxerski 2022-08-26 11:26:23 +02:00
parent f7c741317f
commit 10f529ada7
3 changed files with 6 additions and 3 deletions

View file

@ -199,6 +199,7 @@ void CConfigManager::setDefaultAnimationVars() {
// border // border
// workspaces // workspaces
INITANIMCFG("specialWorkspace");
} }
// init the values // init the values
@ -225,6 +226,8 @@ void CConfigManager::setDefaultAnimationVars() {
CREATEANIMCFG("fadeOut", "fade"); CREATEANIMCFG("fadeOut", "fade");
CREATEANIMCFG("fadeSwitch", "fade"); CREATEANIMCFG("fadeSwitch", "fade");
CREATEANIMCFG("fadeShadow", "fade"); CREATEANIMCFG("fadeShadow", "fade");
CREATEANIMCFG("specialWorkspace", "workspaces");
} }
void CConfigManager::init() { void CConfigManager::init() {

View file

@ -26,9 +26,9 @@ CWorkspace::CWorkspace(int monitorID, std::string name, bool special) {
} }
m_vRenderOffset.m_pWorkspace = this; m_vRenderOffset.m_pWorkspace = this;
m_vRenderOffset.create(AVARTYPE_VECTOR, g_pConfigManager->getAnimationPropertyConfig("workspaces"), nullptr, AVARDAMAGE_ENTIRE); m_vRenderOffset.create(AVARTYPE_VECTOR, special ? g_pConfigManager->getAnimationPropertyConfig("specialWorkspace") : g_pConfigManager->getAnimationPropertyConfig("workspaces"), nullptr, AVARDAMAGE_ENTIRE);
m_fAlpha.m_pWorkspace = this; m_fAlpha.m_pWorkspace = this;
m_fAlpha.create(AVARTYPE_FLOAT, g_pConfigManager->getAnimationPropertyConfig("workspaces"), nullptr, AVARDAMAGE_ENTIRE); m_fAlpha.create(AVARTYPE_FLOAT, special ? g_pConfigManager->getAnimationPropertyConfig("specialWorkspace") : g_pConfigManager->getAnimationPropertyConfig("workspaces"), nullptr, AVARDAMAGE_ENTIRE);
m_fAlpha.setValueAndWarp(255.f); m_fAlpha.setValueAndWarp(255.f);
g_pEventManager->postEvent({"createworkspace", m_szName}, true); g_pEventManager->postEvent({"createworkspace", m_szName}, true);

View file

@ -428,7 +428,7 @@ std::string CAnimationManager::styleValidInConfigVar(const std::string& config,
} }
return "unknown style"; return "unknown style";
} else if (config == "workspaces") { } else if (config == "workspaces" || config == "specialWorkspace") {
if (style == "slide" || style == "slidevert" || style == "fade") if (style == "slide" || style == "slidevert" || style == "fade")
return ""; return "";