diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 22:21:14 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 22:21:14 +0200 |
| commit | 74cbfdcda4d91b8914340d25cf78f5c85e7f2e8c (patch) | |
| tree | 860c294da51074db8b10679e14c7bfe5ca9fc0f0 /src/render | |
| parent | f66365d9dad8ead1bcb7f1b7cdb4820cd9afce2e (diff) | |
guard zero border
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/OpenGL.cpp | 4 |
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}; |
