summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
authorxDarksome <dev@darkso.me>2022-07-16 15:30:32 +0300
committerGitHub <noreply@github.com>2022-07-16 15:30:32 +0300
commit4f9be67298d21c3039278f64ea49feb21eaca9ed (patch)
tree32578b361d42e7fe5c521b4ccc0a7632c844dff4 /src/Window.cpp
parentce9efb7ae38acb84d72035e6b4a772a6fe5e9319 (diff)
parent48e5bd96bc71f94f774eb92b00ef560b2f911c73 (diff)
Merge branch 'hyprwm:main' into main
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 8c8cd147..5568d082 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -8,6 +8,7 @@ CWindow::CWindow() {
m_cRealBorderColor.create(AVARTYPE_COLOR, &g_pConfigManager->getConfigValuePtr("animations:borders_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:borders")->intValue, &g_pConfigManager->getConfigValuePtr("animations:borders_curve")->strValue, (void*)this, AVARDAMAGE_BORDER);
m_fAlpha.create(AVARTYPE_FLOAT, &g_pConfigManager->getConfigValuePtr("animations:fadein_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:fadein")->intValue, &g_pConfigManager->getConfigValuePtr("animations:fadein_curve")->strValue, (void*)this, AVARDAMAGE_ENTIRE);
m_fActiveInactiveAlpha.create(AVARTYPE_FLOAT, &g_pConfigManager->getConfigValuePtr("animations:fadein_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:fadein")->intValue, &g_pConfigManager->getConfigValuePtr("animations:fadein_curve")->strValue, (void*)this, AVARDAMAGE_ENTIRE);
+ m_cRealShadowColor.create(AVARTYPE_COLOR, &g_pConfigManager->getConfigValuePtr("animations:borders_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:borders")->intValue, &g_pConfigManager->getConfigValuePtr("animations:borders_curve")->strValue, (void*)this, AVARDAMAGE_SHADOW);
m_dWindowDecorations.emplace_back(std::make_unique<CHyprDropShadowDecoration>(this)); // put the shadow so it's the first deco (has to be rendered first)
}
@@ -103,3 +104,12 @@ pid_t CWindow::getPID() {
return PID;
}
+
+IHyprWindowDecoration* CWindow::getDecorationByType(eDecorationType type) {
+ for (auto& wd : m_dWindowDecorations) {
+ if (wd->getDecorationType() == type)
+ return wd.get();
+ }
+
+ return nullptr;
+} \ No newline at end of file