mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 15:06:00 +01:00
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:
parent
d20837bef8
commit
739598717b
5 changed files with 9 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue