mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
hyprerror: make hyprerror reserve space (#8040)
This commit is contained in:
@@ -97,6 +97,16 @@ CHyprRenderer::CHyprRenderer() {
|
||||
ensureCursorRenderingMode();
|
||||
});
|
||||
|
||||
static auto P3 = g_pHookSystem->hookDynamic("focusedMon", [&](void* self, SCallbackInfo& info, std::any param) {
|
||||
g_pEventLoopManager->doLater([this]() {
|
||||
if (!g_pHyprError->active())
|
||||
return;
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
arrangeLayersForMonitor(m->ID);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
m_pCursorTicker = wl_event_loop_add_timer(g_pCompositor->m_sWLEventLoop, cursorTicker, nullptr);
|
||||
wl_event_source_timer_update(m_pCursorTicker, 500);
|
||||
|
||||
@@ -1757,6 +1767,13 @@ 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;
|
||||
}
|
||||
|
||||
for (auto& la : PMONITOR->m_aLayerSurfaceLayers) {
|
||||
std::stable_sort(la.begin(), la.end(), [](const PHLLSREF& a, const PHLLSREF& b) { return a->order > b->order; });
|
||||
}
|
||||
|
Reference in New Issue
Block a user