mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:45:59 +01:00
layout: Trigger layout recalcuation on deco position/size change (#5821)
* Trigger layout recalcuation on deco position/size change * Remove now unneeded code * Formatting
This commit is contained in:
parent
ed58cc4c31
commit
d2899a6c27
2 changed files with 2 additions and 6 deletions
|
@ -184,7 +184,6 @@ SWindowDecorationExtents CWindow::getFullWindowReservedArea() {
|
|||
}
|
||||
|
||||
void CWindow::updateWindowDecos() {
|
||||
bool recalc = false;
|
||||
|
||||
if (!m_bIsMapped || isHidden())
|
||||
return;
|
||||
|
@ -193,8 +192,7 @@ void CWindow::updateWindowDecos() {
|
|||
for (auto it = m_dWindowDecorations.begin(); it != m_dWindowDecorations.end(); it++) {
|
||||
if (it->get() == wd) {
|
||||
g_pDecorationPositioner->uncacheDecoration(it->get());
|
||||
it = m_dWindowDecorations.erase(it);
|
||||
recalc = true;
|
||||
it = m_dWindowDecorations.erase(it);
|
||||
if (it == m_dWindowDecorations.end())
|
||||
break;
|
||||
}
|
||||
|
@ -203,9 +201,6 @@ void CWindow::updateWindowDecos() {
|
|||
|
||||
g_pDecorationPositioner->onWindowUpdate(m_pSelf.lock());
|
||||
|
||||
if (recalc)
|
||||
g_pLayoutManager->getCurrentLayout()->recalculateWindow(m_pSelf.lock());
|
||||
|
||||
m_vDecosToRemove.clear();
|
||||
|
||||
// make a copy because updateWindow can remove decos.
|
||||
|
|
|
@ -267,6 +267,7 @@ void CDecorationPositioner::onWindowUpdate(PHLWINDOW pWindow) {
|
|||
}
|
||||
|
||||
WINDOWDATA->extents = {{stickyOffsetXL + reservedXL, stickyOffsetYT + reservedYT}, {stickyOffsetXR + reservedXR, stickyOffsetYB + reservedYB}};
|
||||
g_pLayoutManager->getCurrentLayout()->recalculateWindow(pWindow);
|
||||
}
|
||||
|
||||
void CDecorationPositioner::onWindowUnmap(PHLWINDOW pWindow) {
|
||||
|
|
Loading…
Reference in a new issue