diff options
author | vaxerski <[email protected]> | 2022-06-21 22:54:41 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-06-21 22:54:41 +0200 |
commit | 0f1ad16aecfdf89dd5d83d38318de8518157e6ee (patch) | |
tree | e7ab0c21e6a51123d08c4986bd67fc7164dd0cfc | |
parent | 5541098f2026daed21d87fdaa5c85d8329c8cfbc (diff) | |
download | Hyprland-0f1ad16aecfdf89dd5d83d38318de8518157e6ee.tar.gz Hyprland-0f1ad16aecfdf89dd5d83d38318de8518157e6ee.zip |
added general:no_border_on_floating
-rw-r--r-- | src/config/ConfigManager.cpp | 1 | ||||
-rw-r--r-- | src/render/Renderer.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 2abbdcc4..724adb21 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -28,6 +28,7 @@ void CConfigManager::setDefaultVars() { configValues["general:damage_tracking_internal"].intValue = DAMAGE_TRACKING_NONE; configValues["general:border_size"].intValue = 1; + configValues["general:no_border_on_floating"].intValue = 0; configValues["general:gaps_in"].intValue = 5; configValues["general:gaps_out"].intValue = 20; configValues["general:col.active_border"].intValue = 0xffffffff; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index eb29a65d..b760dac0 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -142,6 +142,8 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, SMonitor* pMonitor, timespec* const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID); const auto REALPOS = pWindow->m_vRealPosition.vec() + PWORKSPACE->m_vRenderOffset.vec(); + static const auto PNOFLOATINGBORDERS = &g_pConfigManager->getConfigValuePtr("general:no_border_on_floating")->intValue; + SRenderData renderdata = {pMonitor->output, time, REALPOS.x, REALPOS.y}; renderdata.surface = g_pXWaylandManager->getWindowSurface(pWindow); renderdata.w = std::clamp(pWindow->m_vRealSize.vec().x, (double)5, (double)1337420); // clamp the size to min 5, @@ -149,7 +151,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, SMonitor* pMonitor, timespec* renderdata.dontRound = pWindow->m_bIsFullscreen && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_FULL; renderdata.fadeAlpha = pWindow->m_fAlpha.fl() * (PWORKSPACE->m_fAlpha.fl() / 255.f); 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"); - renderdata.decorate = decorate && !pWindow->m_bX11DoesntWantBorders; + renderdata.decorate = decorate && !pWindow->m_bX11DoesntWantBorders && (pWindow->m_bIsFloating ? *PNOFLOATINGBORDERS == 0 : true); renderdata.rounding = pWindow->m_sAdditionalConfigData.rounding; // apply window special data |