summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-01-24 19:05:34 +0000
committervaxerski <vaxry@vaxry.net>2023-01-24 19:05:43 +0000
commita2ae37396fd92482534579a5344c0a0594026a33 (patch)
tree5068c72ed5849f86f462c2b86b75781b40791b90 /src/Compositor.cpp
parenteb9fa8460fb613bc701816e7087cc3667e43bb51 (diff)
add hyprctl setprop
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index d9f45309..c1cb9bc6 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1559,9 +1559,12 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) {
if (RENDERDATA.isBorderGradient)
setBorderColor(*RENDERDATA.borderGradient);
else
- setBorderColor(pWindow == m_pLastWindow ?
- (pWindow->m_sSpecialRenderData.activeBorderColor >= 0 ? CGradientValueData(CColor(pWindow->m_sSpecialRenderData.activeBorderColor)) : *ACTIVECOL) :
- (pWindow->m_sSpecialRenderData.inactiveBorderColor >= 0 ? CGradientValueData(CColor(pWindow->m_sSpecialRenderData.inactiveBorderColor)) : *INACTIVECOL));
+ setBorderColor(pWindow == m_pLastWindow ? (pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying() >= 0 ?
+ CGradientValueData(CColor(pWindow->m_sSpecialRenderData.activeBorderColor.toUnderlying())) :
+ *ACTIVECOL) :
+ (pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying() >= 0 ?
+ CGradientValueData(CColor(pWindow->m_sSpecialRenderData.inactiveBorderColor.toUnderlying())) :
+ *INACTIVECOL));
// opacity
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID);
@@ -1570,11 +1573,11 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) {
} else {
if (pWindow == m_pLastWindow)
pWindow->m_fActiveInactiveAlpha =
- pWindow->m_sSpecialRenderData.alphaOverride ? pWindow->m_sSpecialRenderData.alpha : pWindow->m_sSpecialRenderData.alpha * *PACTIVEALPHA;
+ pWindow->m_sSpecialRenderData.alphaOverride.toUnderlying() ? pWindow->m_sSpecialRenderData.alpha.toUnderlying() : pWindow->m_sSpecialRenderData.alpha.toUnderlying() * *PACTIVEALPHA;
else
- pWindow->m_fActiveInactiveAlpha = pWindow->m_sSpecialRenderData.alphaInactive != -1 ?
- (pWindow->m_sSpecialRenderData.alphaInactiveOverride ? pWindow->m_sSpecialRenderData.alphaInactive :
- pWindow->m_sSpecialRenderData.alphaInactive * *PINACTIVEALPHA) :
+ pWindow->m_fActiveInactiveAlpha = pWindow->m_sSpecialRenderData.alphaInactive.toUnderlying() != -1 ?
+ (pWindow->m_sSpecialRenderData.alphaInactiveOverride.toUnderlying() ? pWindow->m_sSpecialRenderData.alphaInactive.toUnderlying() :
+ pWindow->m_sSpecialRenderData.alphaInactive.toUnderlying() * *PINACTIVEALPHA) :
*PINACTIVEALPHA;
}