summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorlevnikmyskin <ale.sleeper@gmail.com>2023-05-01 23:28:27 +0200
committerGitHub <noreply@github.com>2023-05-01 22:28:27 +0100
commitc949173bc9c9f9e8276cba098cb82ed51ad4965b (patch)
treed66c874c988a1229d237fb1818957c0d68a81ab4 /src/render/OpenGL.cpp
parent250d5cf78c191c51c327f6df219fba4ac3ed1a85 (diff)
Added some workspace-specific rules (#1986)
* added some workspace-specific rules * added some worskpace-specific rules, with windowrule like syntax * monitor is not mandatory anymore * pointers to config are now static * fixed optional WorkspaceRule fields * Windows can now specify border size * removed CHyprOpenGLImpl::renderBorder borderSize default value * stuff --------- Co-authored-by: Alessio Molinari <alessiomolinari@gmail.com> Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index ffe4cdc0..7626d419 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -1051,7 +1051,7 @@ void pushVert2D(float x, float y, float* arr, int& counter, wlr_box* box) {
counter++;
}
-void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CGradientValueData& grad, int round, float a) {
+void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CGradientValueData& grad, int round, int borderSize, float a) {
RASSERT((box->width > 0 && box->height > 0), "Tried to render rect with width/height < 0!");
RASSERT(m_RenderData.pMonitor, "Tried to render rect without begin()!");
@@ -1068,10 +1068,10 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CGradientValueData& grad,
box = &newBox;
- if (*PBORDERSIZE < 1)
+ if (borderSize < 1)
return;
- int scaledBorderSize = *PBORDERSIZE * m_RenderData.pMonitor->scale * m_RenderData.renderModif.scale;
+ int scaledBorderSize = borderSize * m_RenderData.pMonitor->scale * m_RenderData.renderModif.scale;
// adjust box
box->x -= scaledBorderSize;