summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-06-04 21:29:38 +0200
committervaxerski <vaxry@vaxry.net>2023-06-04 21:35:23 +0200
commitd83e5b8409e92bb7e8e2b968b5fde25ac0c2171b (patch)
treeeebd7b2b777d04985481710449680d74f8bb7498 /src
parentdf98db50924c05f0bd7a8c95cdab5d4ece13a1f1 (diff)
internal: make borderSize prop overridable
Diffstat (limited to 'src')
-rw-r--r--src/Window.hpp8
-rw-r--r--src/debug/HyprCtl.cpp2
-rw-r--r--src/render/Renderer.cpp2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/Window.hpp b/src/Window.hpp
index d609f91b..c1a36d21 100644
--- a/src/Window.hpp
+++ b/src/Window.hpp
@@ -100,10 +100,10 @@ struct SWindowSpecialRenderData {
CWindowOverridableVar<int64_t> inactiveBorderColor = -1; // -1 means unset
// set by the layout
- int borderSize = -1;
- bool rounding = true;
- bool border = true;
- bool decorate = true;
+ CWindowOverridableVar<int> borderSize = -1; // -1 means unset
+ bool rounding = true;
+ bool border = true;
+ bool decorate = true;
};
struct SWindowAdditionalConfigData {
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 1390c268..a5497bd3 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -990,6 +990,8 @@ std::string dispatchSetProp(std::string request) {
PWINDOW->m_sSpecialRenderData.inactiveBorderColor.forceSetIgnoreLocked(configStringToInt(VAL), lock);
} else if (PROP == "forcergbx") {
PWINDOW->m_sAdditionalConfigData.forceRGBX.forceSetIgnoreLocked(configStringToInt(VAL), lock);
+ } else if (PROP == "bordersize") {
+ PWINDOW->m_sSpecialRenderData.borderSize.forceSetIgnoreLocked(configStringToInt(VAL), lock);
} else {
return "prop not found";
}
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index a3c1973d..7552b17c 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -345,7 +345,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
scaleBox(&windowBox, pMonitor->scale);
- const int BORDERSIZE = pWindow->m_sSpecialRenderData.borderSize == -1 ? *PBORDERSIZE : pWindow->m_sSpecialRenderData.borderSize;
+ const int BORDERSIZE = pWindow->m_sSpecialRenderData.borderSize.toUnderlying() == -1 ? *PBORDERSIZE : pWindow->m_sSpecialRenderData.borderSize.toUnderlying();
g_pHyprOpenGL->renderBorder(&windowBox, grad, rounding, BORDERSIZE, a1);