diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-10-08 21:58:40 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-10-08 21:58:40 +0100 |
| commit | 8cced091f53c92bc8de97b9d3dac20b31980af70 (patch) | |
| tree | 54e668640d0148afa0362921f86ae294b6d9001e /src/render/Renderer.cpp | |
| parent | 91299f7039d80b25b3f0296d3d0f4d2059d41869 (diff) | |
renderer: reserve space for error at the bottom if that's set
ref #8040
Diffstat (limited to 'src/render/Renderer.cpp')
| -rw-r--r-- | src/render/Renderer.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 61f94014..bc95abc6 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1756,7 +1756,9 @@ void CHyprRenderer::arrangeLayerArray(CMonitor* pMonitor, const std::vector<PHLL } void CHyprRenderer::arrangeLayersForMonitor(const MONITORID& monitor) { - const auto PMONITOR = g_pCompositor->getMonitorFromID(monitor); + const auto PMONITOR = g_pCompositor->getMonitorFromID(monitor); + + static auto BAR_POSITION = CConfigValue<Hyprlang::INT>("debug:error_position"); if (!PMONITOR) return; @@ -1768,10 +1770,15 @@ void CHyprRenderer::arrangeLayersForMonitor(const MONITORID& monitor) { CBox usableArea = {PMONITOR->vecPosition.x, PMONITOR->vecPosition.y, PMONITOR->vecSize.x, PMONITOR->vecSize.y}; if (g_pHyprError->active() && g_pCompositor->m_pLastMonitor == PMONITOR->self) { - const auto HEIGHT = g_pHyprError->height(); - PMONITOR->vecReservedTopLeft.y = HEIGHT; - usableArea.y += HEIGHT; - usableArea.h -= HEIGHT; + const auto HEIGHT = g_pHyprError->height(); + if (*BAR_POSITION == 0) { + PMONITOR->vecReservedTopLeft.y = HEIGHT; + usableArea.y += HEIGHT; + usableArea.h -= HEIGHT; + } else { + PMONITOR->vecReservedBottomRight.y = HEIGHT; + usableArea.h -= HEIGHT; + } } for (auto& la : PMONITOR->m_aLayerSurfaceLayers) { |
