remove shadow no_gaps_when_only (#2956)

modified:   src/Window.hpp
	modified:   src/config/ConfigManager.cpp
	modified:   src/config/ConfigManager.hpp
	modified:   src/layout/DwindleLayout.cpp
	modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
This commit is contained in:
MightyPlaza 2023-08-12 21:37:55 +00:00 committed by GitHub
parent d20837bef8
commit 739598717b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 0 deletions

View file

@ -104,6 +104,7 @@ struct SWindowSpecialRenderData {
bool rounding = true; bool rounding = true;
bool border = true; bool border = true;
bool decorate = true; bool decorate = true;
bool shadow = true;
}; };
struct SWindowAdditionalConfigData { struct SWindowAdditionalConfigData {

View file

@ -1144,6 +1144,8 @@ void CConfigManager::handleWorkspaceRules(const std::string& command, const std:
wsRule.borderSize = std::stoi(rule.substr(delim + 11)); wsRule.borderSize = std::stoi(rule.substr(delim + 11));
else if ((delim = rule.find("border:")) != std::string::npos) else if ((delim = rule.find("border:")) != std::string::npos)
wsRule.border = configStringToInt(rule.substr(delim + 7)); wsRule.border = configStringToInt(rule.substr(delim + 7));
else if ((delim = rule.find("shadow:")) != std::string::npos)
wsRule.shadow= configStringToInt(rule.substr(delim + 7));
else if ((delim = rule.find("rounding:")) != std::string::npos) else if ((delim = rule.find("rounding:")) != std::string::npos)
wsRule.rounding = configStringToInt(rule.substr(delim + 9)); wsRule.rounding = configStringToInt(rule.substr(delim + 9));
else if ((delim = rule.find("decorate:")) != std::string::npos) else if ((delim = rule.find("decorate:")) != std::string::npos)

View file

@ -48,6 +48,7 @@ struct SWorkspaceRule {
std::optional<int> border; std::optional<int> border;
std::optional<int> rounding; std::optional<int> rounding;
std::optional<int> decorate; std::optional<int> decorate;
std::optional<int> shadow;
}; };
struct SMonitorAdditionalReservedArea { struct SMonitorAdditionalReservedArea {

View file

@ -150,6 +150,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
(NODESONWORKSPACE == 1 || (PWINDOW->m_bIsFullscreen && g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID)->m_efFullscreenMode == FULLSCREEN_MAXIMIZED))) { (NODESONWORKSPACE == 1 || (PWINDOW->m_bIsFullscreen && g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID)->m_efFullscreenMode == FULLSCREEN_MAXIMIZED))) {
PWINDOW->m_sSpecialRenderData.rounding = false; PWINDOW->m_sSpecialRenderData.rounding = false;
PWINDOW->m_sSpecialRenderData.shadow = false;
PWINDOW->m_sSpecialRenderData.decorate = WORKSPACERULE.decorate.value_or(true); PWINDOW->m_sSpecialRenderData.decorate = WORKSPACERULE.decorate.value_or(true);
PWINDOW->m_sSpecialRenderData.border = WORKSPACERULE.border.value_or(*PNOGAPSWHENONLY == 2); PWINDOW->m_sSpecialRenderData.border = WORKSPACERULE.border.value_or(*PNOGAPSWHENONLY == 2);
@ -167,6 +168,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
PWINDOW->m_sSpecialRenderData.rounding = WORKSPACERULE.rounding.value_or(true); PWINDOW->m_sSpecialRenderData.rounding = WORKSPACERULE.rounding.value_or(true);
PWINDOW->m_sSpecialRenderData.decorate = WORKSPACERULE.decorate.value_or(true); PWINDOW->m_sSpecialRenderData.decorate = WORKSPACERULE.decorate.value_or(true);
PWINDOW->m_sSpecialRenderData.shadow = WORKSPACERULE.shadow.value_or(true);
PWINDOW->m_sSpecialRenderData.border = WORKSPACERULE.border.value_or(true); PWINDOW->m_sSpecialRenderData.border = WORKSPACERULE.border.value_or(true);
PWINDOW->m_sSpecialRenderData.borderSize = WORKSPACERULE.borderSize.value_or(-1); PWINDOW->m_sSpecialRenderData.borderSize = WORKSPACERULE.borderSize.value_or(-1);

View file

@ -59,6 +59,9 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
if (!m_pWindow->m_sSpecialRenderData.decorate) if (!m_pWindow->m_sSpecialRenderData.decorate)
return; return;
if (!m_pWindow->m_sSpecialRenderData.shadow)
return;
if (m_pWindow->m_sAdditionalConfigData.forceNoShadow) if (m_pWindow->m_sAdditionalConfigData.forceNoShadow)
return; return;