mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 17:25:59 +01:00
renderer: reserve space for error at the bottom if that's set
ref #8040
This commit is contained in:
parent
91299f7039
commit
8cced091f5
1 changed files with 12 additions and 5 deletions
|
@ -1758,6 +1758,8 @@ void CHyprRenderer::arrangeLayerArray(CMonitor* pMonitor, const std::vector<PHLL
|
||||||
void CHyprRenderer::arrangeLayersForMonitor(const MONITORID& monitor) {
|
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)
|
if (!PMONITOR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1769,9 +1771,14 @@ void CHyprRenderer::arrangeLayersForMonitor(const MONITORID& monitor) {
|
||||||
|
|
||||||
if (g_pHyprError->active() && g_pCompositor->m_pLastMonitor == PMONITOR->self) {
|
if (g_pHyprError->active() && g_pCompositor->m_pLastMonitor == PMONITOR->self) {
|
||||||
const auto HEIGHT = g_pHyprError->height();
|
const auto HEIGHT = g_pHyprError->height();
|
||||||
|
if (*BAR_POSITION == 0) {
|
||||||
PMONITOR->vecReservedTopLeft.y = HEIGHT;
|
PMONITOR->vecReservedTopLeft.y = HEIGHT;
|
||||||
usableArea.y += HEIGHT;
|
usableArea.y += HEIGHT;
|
||||||
usableArea.h -= HEIGHT;
|
usableArea.h -= HEIGHT;
|
||||||
|
} else {
|
||||||
|
PMONITOR->vecReservedBottomRight.y = HEIGHT;
|
||||||
|
usableArea.h -= HEIGHT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& la : PMONITOR->m_aLayerSurfaceLayers) {
|
for (auto& la : PMONITOR->m_aLayerSurfaceLayers) {
|
||||||
|
|
Loading…
Reference in a new issue