diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 71bfaab7..a4b737f0 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -760,9 +760,15 @@ void CHyprRenderer::arrangeLayersForMonitor(const int& monitor) { PMONITOR->vecReservedTopLeft = Vector2D(usableArea.x, usableArea.y) - PMONITOR->vecPosition; PMONITOR->vecReservedBottomRight = PMONITOR->vecSize - Vector2D(usableArea.width, usableArea.height) - PMONITOR->vecReservedTopLeft; - const auto ENTRY = g_pConfigManager->m_mAdditionalReservedAreas[PMONITOR->szName]; - PMONITOR->vecReservedTopLeft = PMONITOR->vecReservedTopLeft + Vector2D(ENTRY.left, ENTRY.top); - PMONITOR->vecReservedBottomRight = PMONITOR->vecReservedBottomRight + Vector2D(ENTRY.right, ENTRY.bottom); + auto ADDITIONALRESERVED = g_pConfigManager->m_mAdditionalReservedAreas.find(PMONITOR->szName); + if (ADDITIONALRESERVED == g_pConfigManager->m_mAdditionalReservedAreas.end()) { + ADDITIONALRESERVED = g_pConfigManager->m_mAdditionalReservedAreas.find(""); // glob wildcard + } + + if (ADDITIONALRESERVED != g_pConfigManager->m_mAdditionalReservedAreas.end()) { + PMONITOR->vecReservedTopLeft = PMONITOR->vecReservedTopLeft + Vector2D(ADDITIONALRESERVED->second.left, ADDITIONALRESERVED->second.top); + PMONITOR->vecReservedBottomRight = PMONITOR->vecReservedBottomRight + Vector2D(ADDITIONALRESERVED->second.right, ADDITIONALRESERVED->second.bottom); + } // damage the monitor if can if (PMONITOR->damage)