animationmgr: allow empty avars
This commit is contained in:
parent
621eac32d3
commit
5b84b0fb44
2 changed files with 18 additions and 5 deletions
|
|
@ -80,13 +80,13 @@ void CAnimationManager::tick() {
|
|||
|
||||
wlr_box WLRBOXPREV = {0, 0, 0, 0};
|
||||
if (PWINDOW) {
|
||||
WLRBOXPREV = PWINDOW->getFullWindowBoundingBox();
|
||||
PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
|
||||
WLRBOXPREV = PWINDOW->getFullWindowBoundingBox();
|
||||
PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
|
||||
if (!PMONITOR)
|
||||
continue;
|
||||
animationsDisabled = animationsDisabled || PWINDOW->m_sAdditionalConfigData.forceNoAnims;
|
||||
} else if (PWORKSPACE) {
|
||||
PMONITOR = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID);
|
||||
PMONITOR = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID);
|
||||
if (!PMONITOR)
|
||||
continue;
|
||||
WLRBOXPREV = {(int)PMONITOR->vecPosition.x, (int)PMONITOR->vecPosition.y, (int)PMONITOR->vecSize.x, (int)PMONITOR->vecSize.y};
|
||||
|
|
@ -184,6 +184,9 @@ void CAnimationManager::tick() {
|
|||
if (!VISIBLE)
|
||||
continue;
|
||||
|
||||
if (av->m_fUpdateCallback)
|
||||
av->m_fUpdateCallback(av);
|
||||
|
||||
switch (av->m_eDamagePolicy) {
|
||||
case AVARDAMAGE_ENTIRE: {
|
||||
g_pHyprRenderer->damageBox(&WLRBOXPREV);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue