diff --git a/hyprfocus/main.cpp b/hyprfocus/main.cpp index a678cc8..2f74af2 100644 --- a/hyprfocus/main.cpp +++ b/hyprfocus/main.cpp @@ -52,15 +52,15 @@ static void onFocusChange(PHLWINDOW window) { const auto POUT = g_pConfigManager->getAnimationPropertyConfig("hyprfocusOut"); if (*PMODE == "flash") { + const auto ORIGINAL = window->m_activeInactiveAlpha->goal(); window->m_activeInactiveAlpha->setConfig(PIN); *window->m_activeInactiveAlpha = std::clamp(*POPACITY, 0.F, 1.F); - window->m_activeInactiveAlpha->setCallbackOnEnd([w = PHLWINDOWREF{window}, POUT](WP pav) { + window->m_activeInactiveAlpha->setCallbackOnEnd([w = PHLWINDOWREF{window}, POUT, ORIGINAL](WP pav) { if (!w) return; w->m_activeInactiveAlpha->setConfig(POUT); - w->updateDecorationValues(); - w->m_ruleApplicator->propertiesChanged(Desktop::Rule::RULE_PROP_ON_WORKSPACE); + *w->m_activeInactiveAlpha = ORIGINAL; w->m_activeInactiveAlpha->setCallbackOnEnd(nullptr); });