aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-10-08 21:20:25 +0100
committerGitHub <[email protected]>2024-10-08 21:20:25 +0100
commit91299f7039d80b25b3f0296d3d0f4d2059d41869 (patch)
treec539245c644990c58fa998256c94d8b8e0861181 /src/render
parent60308a2bb576413cbc787d4bde4f8d0e3fa3c9d6 (diff)
downloadHyprland-91299f7039d80b25b3f0296d3d0f4d2059d41869.tar.gz
Hyprland-91299f7039d80b25b3f0296d3d0f4d2059d41869.zip
hyprerror: make hyprerror reserve space (#8040)
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Renderer.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index f388ec37..61f94014 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -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; });
}