From 3278db67a2328443b3f93c8559fc37fa6e8fc82f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 7 Jul 2022 20:16:40 +0200 Subject: [PATCH] added general:disable_hyprland_logo --- src/config/ConfigManager.cpp | 1 + src/render/OpenGL.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index a20ac431..570fd1f6 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -36,6 +36,7 @@ void CConfigManager::setDefaultVars() { configValues["general:col.active_border"].intValue = 0xffffffff; configValues["general:col.inactive_border"].intValue = 0xff444444; configValues["general:cursor_inactive_timeout"].intValue = 0; + configValues["general:disable_hyprland_logo"].intValue = 0; configValues["debug:int"].intValue = 0; configValues["debug:log_damage"].intValue = 0; diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index c868c345..42dcec1a 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -969,9 +969,14 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(SMonitor* pMonitor) { void CHyprOpenGLImpl::clearWithTex() { RASSERT(m_RenderData.pMonitor, "Tried to render BGtex without begin()!"); - wlr_box box = {0, 0, m_RenderData.pMonitor->vecTransformedSize.x, m_RenderData.pMonitor->vecTransformedSize.y}; + static auto *const PRENDERTEX = &g_pConfigManager->getConfigValuePtr("general:disable_hyprland_logo")->intValue; - renderTexture(m_mMonitorBGTextures[m_RenderData.pMonitor], &box, 255, 0); + if (!*PRENDERTEX) { + wlr_box box = {0, 0, m_RenderData.pMonitor->vecTransformedSize.x, m_RenderData.pMonitor->vecTransformedSize.y}; + renderTexture(m_mMonitorBGTextures[m_RenderData.pMonitor], &box, 255, 0); + } else { + clear(CColor(17,17,17,255)); + } } void CHyprOpenGLImpl::destroyMonitorResources(SMonitor* pMonitor) {