diff options
| author | MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> | 2023-07-23 13:49:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-23 15:49:49 +0200 |
| commit | d3bba2489d1cf8d7012abdca6a55177eb971076c (patch) | |
| tree | d6f91f0211569b15a3ae81aec5adeef26c418369 /src/Window.cpp | |
| parent | b21644b61143de0835fef9c3fa69fbdd2553cdfa (diff) | |
render: Border fixes (#2781)
* Window.cpp
* layout
* CHyprGroupBarDecoration.cpp
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index e95a0959..233a1088 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -25,12 +25,20 @@ CWindow::~CWindow() { wlr_box CWindow::getFullWindowBoundingBox() { static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue; + const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(g_pCompositor->getWorkspaceByID(m_iWorkspaceID)); + + auto borderSize = m_sSpecialRenderData.borderSize.toUnderlying() != -1 ? m_sSpecialRenderData.borderSize.toUnderlying() : WORKSPACERULE.borderSize.value_or(*PBORDERSIZE); + if (m_sAdditionalConfigData.borderSize.toUnderlying() != -1) + borderSize = m_sAdditionalConfigData.borderSize.toUnderlying(); + + borderSize *= m_sSpecialRenderData.border && !m_sAdditionalConfigData.forceNoBorder; + if (m_sAdditionalConfigData.dimAround) { const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); return {PMONITOR->vecPosition.x, PMONITOR->vecPosition.y, PMONITOR->vecSize.x, PMONITOR->vecSize.y}; } - SWindowDecorationExtents maxExtents = {{*PBORDERSIZE + 2, *PBORDERSIZE + 2}, {*PBORDERSIZE + 2, *PBORDERSIZE + 2}}; + SWindowDecorationExtents maxExtents = {{borderSize + 2, borderSize + 2}, {borderSize + 2, borderSize + 2}}; for (auto& wd : m_dWindowDecorations) { |
