Skip to content

Commit

Permalink
dont store unless specified
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Feb 24, 2025
1 parent 5f95671 commit 4cefd84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/desktop/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ CWindow::~CWindow() {
g_pHyprRenderer->makeEGLCurrent();
std::erase_if(g_pHyprOpenGL->m_mWindowFramebuffers, [&](const auto& other) { return !other.first.lock() || other.first.lock().get() == this; });

if (m_bIsFloating && !m_bIsX11)
if (m_bIsFloating && !m_bIsX11 && std::any_of(m_vMatchedRules.begin(), m_vMatchedRules.end(), [](const auto& r) { return r->ruleType == CWindowRule::RULE_NOMAXIMIZEHINTS; }))
g_pConfigManager->storeFloatingSize(m_szClass, m_szTitle, m_vRealSize->value());
}

Expand Down Expand Up @@ -1332,7 +1332,7 @@ void CWindow::clampWindowSize(const std::optional<Vector2D> minSize, const std::
*m_vRealPosition = m_vRealPosition->goal() + DELTA / 2.0;
*m_vRealSize = NEWSIZE;

if (m_bIsFloating && !m_bIsX11)
if (m_bIsFloating && !m_bIsX11 && std::any_of(m_vMatchedRules.begin(), m_vMatchedRules.end(), [](const auto& r) { return r->ruleType == CWindowRule::RULE_NOMAXIMIZEHINTS; }))
g_pConfigManager->storeFloatingSize(m_szClass, m_szTitle, m_vRealSize->value());
}

Expand Down

0 comments on commit 4cefd84

Please sign in to comment.