summaryrefslogtreecommitdiff
path: root/src/render/decorations
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-25 20:31:54 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-25 20:31:54 +0200
commit2955698f2833920c2356429c4cf7771ebf7e2d56 (patch)
treeb2dcbbe9530f5bcc162bc4e60432fd73509bf321 /src/render/decorations
parent747ff3369d6377628e3e27e3b108c8d61cbc5733 (diff)
fix fade with deco
Diffstat (limited to 'src/render/decorations')
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.cpp4
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.hpp2
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp3
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.hpp2
-rw-r--r--src/render/decorations/IHyprWindowDecoration.hpp2
5 files changed, 7 insertions, 6 deletions
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp
index 528e00cf..6933e687 100644
--- a/src/render/decorations/CHyprDropShadowDecoration.cpp
+++ b/src/render/decorations/CHyprDropShadowDecoration.cpp
@@ -37,7 +37,7 @@ void CHyprDropShadowDecoration::updateWindow(CWindow* pWindow) {
damageEntire();
}
-void CHyprDropShadowDecoration::draw(SMonitor* pMonitor) {
+void CHyprDropShadowDecoration::draw(SMonitor* pMonitor, float a) {
if (!g_pCompositor->windowValidMapped(m_pWindow))
return;
@@ -62,5 +62,5 @@ void CHyprDropShadowDecoration::draw(SMonitor* pMonitor) {
fullBox.x -= pMonitor->vecPosition.x;
fullBox.y -= pMonitor->vecPosition.y;
- g_pHyprOpenGL->renderRoundedShadow(&fullBox, *PROUNDING, *PSHADOWSIZE);
+ g_pHyprOpenGL->renderRoundedShadow(&fullBox, *PROUNDING, *PSHADOWSIZE, a);
}
diff --git a/src/render/decorations/CHyprDropShadowDecoration.hpp b/src/render/decorations/CHyprDropShadowDecoration.hpp
index 2a248a2f..f734c111 100644
--- a/src/render/decorations/CHyprDropShadowDecoration.hpp
+++ b/src/render/decorations/CHyprDropShadowDecoration.hpp
@@ -9,7 +9,7 @@ public:
virtual SWindowDecorationExtents getWindowDecorationExtents();
- virtual void draw(SMonitor*);
+ virtual void draw(SMonitor*, float a);
virtual eDecorationType getDecorationType();
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index 25d74065..2bb486ee 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -68,7 +68,7 @@ void CHyprGroupBarDecoration::damageEntire() {
g_pHyprRenderer->damageBox(&dm);
}
-void CHyprGroupBarDecoration::draw(SMonitor* pMonitor) {
+void CHyprGroupBarDecoration::draw(SMonitor* pMonitor, float a) {
// get how many bars we will draw
int barsToDraw = m_dwGroupMembers.size();
@@ -88,6 +88,7 @@ void CHyprGroupBarDecoration::draw(SMonitor* pMonitor) {
break;
CColor color = m_dwGroupMembers[i] == g_pCompositor->m_pLastWindow ? CColor(g_pConfigManager->getInt("dwindle:col.group_border_active")) : CColor(g_pConfigManager->getInt("dwindle:col.group_border"));
+ color.a *= a;
g_pHyprOpenGL->renderRect(&rect, color);
xoff += PAD + BARW;
diff --git a/src/render/decorations/CHyprGroupBarDecoration.hpp b/src/render/decorations/CHyprGroupBarDecoration.hpp
index 74a597a6..76baab65 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.hpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.hpp
@@ -10,7 +10,7 @@ public:
virtual SWindowDecorationExtents getWindowDecorationExtents();
- virtual void draw(SMonitor*);
+ virtual void draw(SMonitor*, float a);
virtual eDecorationType getDecorationType();
diff --git a/src/render/decorations/IHyprWindowDecoration.hpp b/src/render/decorations/IHyprWindowDecoration.hpp
index e9011a29..21219b36 100644
--- a/src/render/decorations/IHyprWindowDecoration.hpp
+++ b/src/render/decorations/IHyprWindowDecoration.hpp
@@ -22,7 +22,7 @@ public:
virtual SWindowDecorationExtents getWindowDecorationExtents() = 0;
- virtual void draw(SMonitor*) = 0;
+ virtual void draw(SMonitor*, float a) = 0;
virtual eDecorationType getDecorationType() = 0;