better ls noanim handling

This commit is contained in:
vaxerski 2023-01-25 15:38:21 +00:00
parent 8ae1fd0173
commit fc89e70a1f
2 changed files with 1 additions and 6 deletions

View file

@ -165,9 +165,6 @@ void Events::listener_mapLayerSurface(void* owner, void* data) {
layersurface->readyToDelete = false; layersurface->readyToDelete = false;
layersurface->fadingOut = false; layersurface->fadingOut = false;
if (layersurface->noAnimations)
layersurface->alpha.setValueAndWarp(1.f);
g_pEventManager->postEvent(SHyprIPCEvent{"openlayer", std::string(layersurface->layerSurface->_namespace ? layersurface->layerSurface->_namespace : "")}); g_pEventManager->postEvent(SHyprIPCEvent{"openlayer", std::string(layersurface->layerSurface->_namespace ? layersurface->layerSurface->_namespace : "")});
} }
@ -198,9 +195,6 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) {
g_pHyprOpenGL->makeLayerSnapshot(layersurface); g_pHyprOpenGL->makeLayerSnapshot(layersurface);
layersurface->alpha = 0.f; layersurface->alpha = 0.f;
if (layersurface->noAnimations)
layersurface->alpha.setValueAndWarp(0.f);
layersurface->mapped = false; layersurface->mapped = false;
layersurface->fadingOut = true; layersurface->fadingOut = true;

View file

@ -67,6 +67,7 @@ void CAnimationManager::tick() {
} else if (PLAYER) { } else if (PLAYER) {
WLRBOXPREV = PLAYER->geometry; WLRBOXPREV = PLAYER->geometry;
PMONITOR = g_pCompositor->getMonitorFromVector(Vector2D(PLAYER->geometry.x, PLAYER->geometry.y) + Vector2D(PLAYER->geometry.width, PLAYER->geometry.height) / 2.f); PMONITOR = g_pCompositor->getMonitorFromVector(Vector2D(PLAYER->geometry.x, PLAYER->geometry.y) + Vector2D(PLAYER->geometry.width, PLAYER->geometry.height) / 2.f);
animationsDisabled = animationsDisabled || PLAYER->noAnimations;
} }
// beziers are with a switch unforto // beziers are with a switch unforto