mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
internal: make borderSize prop overridable
This commit is contained in:
@@ -100,7 +100,7 @@ struct SWindowSpecialRenderData {
|
|||||||
CWindowOverridableVar<int64_t> inactiveBorderColor = -1; // -1 means unset
|
CWindowOverridableVar<int64_t> inactiveBorderColor = -1; // -1 means unset
|
||||||
|
|
||||||
// set by the layout
|
// set by the layout
|
||||||
int borderSize = -1;
|
CWindowOverridableVar<int> borderSize = -1; // -1 means unset
|
||||||
bool rounding = true;
|
bool rounding = true;
|
||||||
bool border = true;
|
bool border = true;
|
||||||
bool decorate = true;
|
bool decorate = true;
|
||||||
|
@@ -990,6 +990,8 @@ std::string dispatchSetProp(std::string request) {
|
|||||||
PWINDOW->m_sSpecialRenderData.inactiveBorderColor.forceSetIgnoreLocked(configStringToInt(VAL), lock);
|
PWINDOW->m_sSpecialRenderData.inactiveBorderColor.forceSetIgnoreLocked(configStringToInt(VAL), lock);
|
||||||
} else if (PROP == "forcergbx") {
|
} else if (PROP == "forcergbx") {
|
||||||
PWINDOW->m_sAdditionalConfigData.forceRGBX.forceSetIgnoreLocked(configStringToInt(VAL), lock);
|
PWINDOW->m_sAdditionalConfigData.forceRGBX.forceSetIgnoreLocked(configStringToInt(VAL), lock);
|
||||||
|
} else if (PROP == "bordersize") {
|
||||||
|
PWINDOW->m_sSpecialRenderData.borderSize.forceSetIgnoreLocked(configStringToInt(VAL), lock);
|
||||||
} else {
|
} else {
|
||||||
return "prop not found";
|
return "prop not found";
|
||||||
}
|
}
|
||||||
|
@@ -345,7 +345,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
|||||||
|
|
||||||
scaleBox(&windowBox, pMonitor->scale);
|
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);
|
g_pHyprOpenGL->renderBorder(&windowBox, grad, rounding, BORDERSIZE, a1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user