fix recalc dwindle

This commit is contained in:
vaxerski 2022-03-19 20:59:22 +01:00
parent 1a298257c9
commit 3277321c26

View File

@ -250,7 +250,11 @@ void CHyprDwindleLayout::onWindowRemoved(CWindow* pWindow) {
void CHyprDwindleLayout::recalculateMonitor(const int& monid) { void CHyprDwindleLayout::recalculateMonitor(const int& monid) {
const auto TOPNODE = getMasterNodeOnMonitor(monid); const auto TOPNODE = getMasterNodeOnMonitor(monid);
const auto PMONITOR = g_pCompositor->getMonitorFromID(monid);
if (TOPNODE) if (TOPNODE && PMONITOR) {
TOPNODE->position = PMONITOR->vecPosition + PMONITOR->vecReservedTopLeft;
TOPNODE->size = PMONITOR->vecSize - PMONITOR->vecReservedTopLeft - PMONITOR->vecReservedBottomRight;
TOPNODE->recalcSizePosRecursive(); TOPNODE->recalcSizePosRecursive();
} }
}