summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-05 22:21:14 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-05 22:21:14 +0200
commit74cbfdcda4d91b8914340d25cf78f5c85e7f2e8c (patch)
tree860c294da51074db8b10679e14c7bfe5ca9fc0f0 /src/render
parentf66365d9dad8ead1bcb7f1b7cdb4820cd9afce2e (diff)
guard zero border
Diffstat (limited to 'src/render')
-rw-r--r--src/render/OpenGL.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 5ad9ce7a..a9338b88 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -741,9 +741,11 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CColor& col, int round) {
static auto *const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
static auto *const PMULTISAMPLE = &g_pConfigManager->getConfigValuePtr("decoration:multisample_edges")->intValue;
+ if (*PBORDERSIZE < 1)
+ return;
+
if (round < 1) {
// zero rounding, just lines
-
wlr_box borderbox = {box->x - *PBORDERSIZE, box->y - *PBORDERSIZE, *PBORDERSIZE, box->height + 2 * *PBORDERSIZE};
renderRect(&borderbox, col, 0); // left
borderbox = {box->x, box->y - (int)*PBORDERSIZE, box->width + (int)*PBORDERSIZE, (int)*PBORDERSIZE};