summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render/OpenGL.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index bb4cc97d..6109d2c6 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -631,7 +631,16 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CColor& col, int thick, i
glEnableVertexAttribArray(m_shQUAD.posAttrib);
glLineWidth(thick);
- glDrawArrays(GL_LINE_STRIP, 0, 41);
+
+ // draw with damage
+ if (pixman_region32_not_empty(m_RenderData.pDamage)) {
+ PIXMAN_DAMAGE_FOREACH(m_RenderData.pDamage) {
+ const auto RECT = RECTSARR[i];
+ scissor(&RECT);
+
+ glDrawArrays(GL_LINE_STRIP, 0, 41);
+ }
+ }
glDisableVertexAttribArray(m_shQUAD.posAttrib);
}