decorations: fix infinite recursion on no_gaps when only (#7169)

modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/MasterLayout.cpp
modified:   src/render/decorations/CHyprBorderDecoration.cpp
This commit is contained in:
MightyPlaza 2024-08-03 17:50:08 +00:00 committed by GitHub
parent ae50f8614d
commit 51ffd7fa6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 7 deletions

View file

@ -141,7 +141,6 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
PWINDOW->unsetWindowData(PRIORITY_LAYOUT); PWINDOW->unsetWindowData(PRIORITY_LAYOUT);
PWINDOW->updateWindowData(); PWINDOW->updateWindowData();
PWINDOW->updateWindowDecos();
static auto PNOGAPSWHENONLY = CConfigValue<Hyprlang::INT>("dwindle:no_gaps_when_only"); static auto PNOGAPSWHENONLY = CConfigValue<Hyprlang::INT>("dwindle:no_gaps_when_only");
static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in"); static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in");
@ -178,6 +177,8 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
return; return;
} }
PWINDOW->updateWindowDecos();
auto calcPos = PWINDOW->m_vPosition; auto calcPos = PWINDOW->m_vPosition;
auto calcSize = PWINDOW->m_vSize; auto calcSize = PWINDOW->m_vSize;
@ -245,8 +246,6 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
g_pHyprRenderer->damageWindow(PWINDOW); g_pHyprRenderer->damageWindow(PWINDOW);
} }
PWINDOW->updateWindowDecos();
} }
void CHyprDwindleLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection direction) { void CHyprDwindleLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection direction) {

View file

@ -650,7 +650,6 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
PWINDOW->unsetWindowData(PRIORITY_LAYOUT); PWINDOW->unsetWindowData(PRIORITY_LAYOUT);
PWINDOW->updateWindowData(); PWINDOW->updateWindowData();
PWINDOW->updateWindowDecos();
static auto PNOGAPSWHENONLY = CConfigValue<Hyprlang::INT>("master:no_gaps_when_only"); static auto PNOGAPSWHENONLY = CConfigValue<Hyprlang::INT>("master:no_gaps_when_only");
static auto PANIMATE = CConfigValue<Hyprlang::INT>("misc:animate_manual_resizes"); static auto PANIMATE = CConfigValue<Hyprlang::INT>("misc:animate_manual_resizes");
@ -689,6 +688,8 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
return; return;
} }
PWINDOW->updateWindowDecos();
auto calcPos = PWINDOW->m_vPosition; auto calcPos = PWINDOW->m_vPosition;
auto calcSize = PWINDOW->m_vSize; auto calcSize = PWINDOW->m_vSize;
@ -731,8 +732,6 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
g_pHyprRenderer->damageWindow(PWINDOW); g_pHyprRenderer->damageWindow(PWINDOW);
} }
PWINDOW->updateWindowDecos();
} }
bool CHyprMasterLayout::isWindowTiled(PHLWINDOW pWindow) { bool CHyprMasterLayout::isWindowTiled(PHLWINDOW pWindow) {

View file

@ -93,7 +93,7 @@ void CHyprBorderDecoration::updateWindow(PHLWINDOW) {
m_iLastBorderSize = borderSize; m_iLastBorderSize = borderSize;
g_pEventLoopManager->doLater([this]() { g_pDecorationPositioner->repositionDeco(this); }); g_pDecorationPositioner->repositionDeco(this);
} }
void CHyprBorderDecoration::damageEntire() { void CHyprBorderDecoration::damageEntire() {