diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-04-07 14:24:36 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-07 12:07:36 -0400 |
| commit | ec8c336e1446de8a2b32dc7767bc88a9b99c6daa (patch) | |
| tree | c0c3cf11f7689f5aa629d13d6b685800684f9280 /src/render | |
| parent | a1c8c2f1f466fb9e9d10eeb589862e81ce89ae92 (diff) | |
decoration/border: simplify damage callback
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/decorations/CHyprBorderDecoration.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/render/decorations/CHyprBorderDecoration.cpp b/src/render/decorations/CHyprBorderDecoration.cpp index 2785a956..603d8635 100644 --- a/src/render/decorations/CHyprBorderDecoration.cpp +++ b/src/render/decorations/CHyprBorderDecoration.cpp @@ -126,9 +126,15 @@ void CHyprBorderDecoration::damageEntire() { borderRegion.subtract(GLOBAL_BOX.copy().expand(-(BORDERSIZE + ROUNDING))); borderRegion.expand(2); // pad + const CBox borderExtents = borderRegion.getExtents(); + for (auto const& m : g_pCompositor->m_monitors) { + const CBox monitorBox = {m->m_position, m->m_size}; + if (borderExtents.intersection(monitorBox).empty()) + continue; + if (!g_pHyprRenderer->shouldRenderWindow(m_window.lock(), m)) { - const CRegion monitorRegion({m->m_position, m->m_size}); + const CRegion monitorRegion(monitorBox); borderRegion.subtract(monitorRegion); } } |
