mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 09:45:58 +01:00
window: recalc on deco remove
This commit is contained in:
parent
e4e6ddb075
commit
1a4e6e6a4b
1 changed files with 7 additions and 1 deletions
|
@ -145,16 +145,22 @@ void CWindow::updateWindowDecos() {
|
||||||
for (auto& wd : m_dWindowDecorations)
|
for (auto& wd : m_dWindowDecorations)
|
||||||
wd->updateWindow(this);
|
wd->updateWindow(this);
|
||||||
|
|
||||||
|
bool recalc = false;
|
||||||
|
|
||||||
for (auto& wd : m_vDecosToRemove) {
|
for (auto& wd : m_vDecosToRemove) {
|
||||||
for (auto it = m_dWindowDecorations.begin(); it != m_dWindowDecorations.end(); it++) {
|
for (auto it = m_dWindowDecorations.begin(); it != m_dWindowDecorations.end(); it++) {
|
||||||
if (it->get() == wd) {
|
if (it->get() == wd) {
|
||||||
it = m_dWindowDecorations.erase(it);
|
it = m_dWindowDecorations.erase(it);
|
||||||
|
recalc = true;
|
||||||
if (it == m_dWindowDecorations.end())
|
if (it == m_dWindowDecorations.end())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (recalc)
|
||||||
|
g_pLayoutManager->getCurrentLayout()->recalculateWindow(this);
|
||||||
|
|
||||||
m_vDecosToRemove.clear();
|
m_vDecosToRemove.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue