mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 18: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() {
|
void CWindow::updateWindowDecos() {
|
||||||
bool recalc = false;
|
|
||||||
|
|
||||||
if (!m_bIsMapped || isHidden())
|
if (!m_bIsMapped || isHidden())
|
||||||
return;
|
return;
|
||||||
|
@ -194,7 +193,6 @@ void CWindow::updateWindowDecos() {
|
||||||
if (it->get() == wd) {
|
if (it->get() == wd) {
|
||||||
g_pDecorationPositioner->uncacheDecoration(it->get());
|
g_pDecorationPositioner->uncacheDecoration(it->get());
|
||||||
it = m_dWindowDecorations.erase(it);
|
it = m_dWindowDecorations.erase(it);
|
||||||
recalc = true;
|
|
||||||
if (it == m_dWindowDecorations.end())
|
if (it == m_dWindowDecorations.end())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -203,9 +201,6 @@ void CWindow::updateWindowDecos() {
|
||||||
|
|
||||||
g_pDecorationPositioner->onWindowUpdate(m_pSelf.lock());
|
g_pDecorationPositioner->onWindowUpdate(m_pSelf.lock());
|
||||||
|
|
||||||
if (recalc)
|
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateWindow(m_pSelf.lock());
|
|
||||||
|
|
||||||
m_vDecosToRemove.clear();
|
m_vDecosToRemove.clear();
|
||||||
|
|
||||||
// make a copy because updateWindow can remove decos.
|
// 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}};
|
WINDOWDATA->extents = {{stickyOffsetXL + reservedXL, stickyOffsetYT + reservedYT}, {stickyOffsetXR + reservedXR, stickyOffsetYB + reservedYB}};
|
||||||
|
g_pLayoutManager->getCurrentLayout()->recalculateWindow(pWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDecorationPositioner::onWindowUnmap(PHLWINDOW pWindow) {
|
void CDecorationPositioner::onWindowUnmap(PHLWINDOW pWindow) {
|
||||||
|
|
Loading…
Reference in a new issue