diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-03 23:14:51 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-03 23:14:51 +0200 |
| commit | a229701f288a2815c70e40b071cdc90147fc2089 (patch) | |
| tree | 5fe7c6f75c93e4dd0e8f8fde2b82971565adc967 /src/layout/DwindleLayout.cpp | |
| parent | 01228fbc9c785cd04b903a36f4710f04639f11a8 (diff) | |
fix crash with null pmonitor in special nodes on dwindle
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 33af48a3..46777847 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -93,17 +93,17 @@ SDwindleNodeData* CHyprDwindleLayout::getMasterNodeOnWorkspace(const int& id) { } void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode) { + // Don't set nodes, only windows. + if (pNode->isNode) + return; + const auto PMONITOR = g_pCompositor->getMonitorFromID(g_pCompositor->getWorkspaceByID(pNode->workspaceID)->m_iMonitorID); - if (!PMONITOR){ + if (!PMONITOR) { Debug::log(ERR, "Orphaned Node %x (workspace ID: %i)!!", pNode, pNode->workspaceID); return; } - // Don't set nodes, only windows. - if (pNode->isNode) - return; - // for gaps outer const bool DISPLAYLEFT = STICKS(pNode->position.x, PMONITOR->vecPosition.x + PMONITOR->vecReservedTopLeft.x); const bool DISPLAYRIGHT = STICKS(pNode->position.x + pNode->size.x, PMONITOR->vecPosition.x + PMONITOR->vecSize.x - PMONITOR->vecReservedBottomRight.x); |
