summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
author0x455241 <5455732+0x455241@users.noreply.github.com>2023-08-08 16:00:11 +0000
committerGitHub <noreply@github.com>2023-08-08 18:00:11 +0200
commitb3393c429f1b9c70fd815422cdbceefb8b0d0c72 (patch)
treec1f62e09ca1b8fc6a6c62607db831146ac07db1e /src/render/Renderer.cpp
parentc748f36939cdac74332dde3afb866ad35bea1825 (diff)
background: add background color option (#2915)
Co-authored-by: 0x455241 <>
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index cf6877f3..aaa15b86 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -825,6 +825,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
static auto* const PVFR = &g_pConfigManager->getConfigValuePtr("misc:vfr")->intValue;
static auto* const PZOOMFACTOR = &g_pConfigManager->getConfigValuePtr("misc:cursor_zoom_factor")->floatValue;
static auto* const PRENDERTEX = &g_pConfigManager->getConfigValuePtr("misc:disable_hyprland_logo")->intValue;
+ static auto* const PBACKGROUNDCOLOR = &g_pConfigManager->getConfigValuePtr("misc:background_color")->intValue;
static auto* const PANIMENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue;
static int damageBlinkCleanup = 0; // because double-buffered
@@ -1014,7 +1015,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
g_pHyprOpenGL->blend(false);
if (!canSkipBackBufferClear(pMonitor)) {
if (*PRENDERTEX /* inverted cfg flag */)
- g_pHyprOpenGL->clear(CColor(17.0 / 255.0, 17.0 / 255.0, 17.0 / 255.0, 1.0));
+ g_pHyprOpenGL->clear(CColor(*PBACKGROUNDCOLOR));
else
g_pHyprOpenGL->clearWithTex(); // will apply the hypr "wallpaper"
}