fix flicker with workspaces anim off, turn anim off by default

This commit is contained in:
vaxerski 2021-12-24 09:29:54 +01:00
parent 22c1b436ea
commit ce024f7c36
2 changed files with 9 additions and 3 deletions

View file

@ -43,7 +43,7 @@ void ConfigManager::init() {
configValues["anim:enabled"].intValue = 0;
configValues["anim:cheap"].intValue = 1;
configValues["anim:borders"].intValue = 1;
configValues["anim:workspaces"].intValue = 1;
configValues["anim:workspaces"].intValue = 0;
if (!g_pWindowManager->statusBar) {
isFirstLaunch = true;

View file

@ -1979,11 +1979,17 @@ void CWindowManager::startWipeAnimOnWorkspace(const int& oldwork, const int& new
for (auto& work : workspaces) {
if (work.getID() == oldwork) {
work.setCurrentOffset(Vector2D(0,0));
if (ConfigManager::getInt("anim:workspaces") == 1)
work.setCurrentOffset(Vector2D(0,0));
else
work.setCurrentOffset(Vector2D(150000, 150000));
work.setGoalOffset(Vector2D(PMONITOR->vecSize.x, 0));
work.setAnimationInProgress(true);
} else if (work.getID() == newwork) {
work.setCurrentOffset(Vector2D(-PMONITOR->vecSize.x, 0));
if (ConfigManager::getInt("anim:workspaces") == 1)
work.setCurrentOffset(Vector2D(-PMONITOR->vecSize.x, 0));
else
work.setCurrentOffset(Vector2D(0, 0));
work.setGoalOffset(Vector2D(0, 0));
work.setAnimationInProgress(true);
}