aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-17 00:15:01 +0200
committerGitHub <[email protected]>2022-05-17 00:15:01 +0200
commit48b8ab3f6538df29c4e0f50a5fbb7808fd4c475b (patch)
treea478e2ac453e95e5bf820e9a141f75cb82ef40a9
parentf09de365d5214ea73e6578bd7a72e6c16740b6a0 (diff)
parent3fd2ef2107cfe9da5020c9f85c6f30fc0db104fb (diff)
downloadHyprland-48b8ab3f6538df29c4e0f50a5fbb7808fd4c475b.tar.gz
Hyprland-48b8ab3f6538df29c4e0f50a5fbb7808fd4c475b.zip
Merge pull request #84 from Four-Griffins/main
Opacity setting for fullscreen windows
-rw-r--r--src/config/ConfigManager.cpp3
-rw-r--r--src/render/Renderer.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 92e7f0cf..34cb896f 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -42,6 +42,7 @@ void CConfigManager::setDefaultVars() {
configValues["decoration:blur_passes"].intValue = 1;
configValues["decoration:active_opacity"].floatValue = 1;
configValues["decoration:inactive_opacity"].floatValue = 1;
+ configValues["decoration:fullscreen_opacity"].floatValue = 1;
configValues["dwindle:pseudotile"].intValue = 0;
configValues["dwindle:col.group_border"].intValue = 0x66777700;
@@ -849,4 +850,4 @@ void CConfigManager::performMonitorReload() {
SConfigValue* CConfigManager::getConfigValuePtr(std::string val) {
return &configValues[val];
-} \ No newline at end of file
+}
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 0d646317..fef08429 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -97,7 +97,8 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, SMonitor* pMonitor, timespec*
renderdata.h = pWindow->m_vRealSize.vec().y;
renderdata.dontRound = pWindow->m_bIsFullscreen;
renderdata.fadeAlpha = pWindow->m_fAlpha.fl() * (PWORKSPACE->m_fAlpha.fl() / 255.f);
- renderdata.alpha = pWindow == g_pCompositor->m_pLastWindow ? g_pConfigManager->getFloat("decoration:active_opacity") : g_pConfigManager->getFloat("decoration:inactive_opacity");
+ renderdata.alpha = pWindow->m_bIsFullscreen ? g_pConfigManager->getFloat("decoration:fullscreen_opacity") :
+ pWindow == g_pCompositor->m_pLastWindow ? g_pConfigManager->getFloat("decoration:active_opacity") : g_pConfigManager->getFloat("decoration:inactive_opacity");
// apply window special data
renderdata.alpha *= pWindow->m_sSpecialRenderData.alpha;