diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2023-12-10 16:28:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-10 16:28:12 +0000 |
| commit | 9f5b9053c6fb7942a0ff27dc61fc6874e4354888 (patch) | |
| tree | f117abba6e6b5c2f4a673e67039225f7fca04be2 /src/layout/MasterLayout.cpp | |
| parent | b3dc58e1047cba0778831bdb069c3ceba6ec216e (diff) | |
internal: Remake borders as window decorations (#4104)
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 3977d8f6..8b12d669 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -667,24 +667,20 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { PWINDOW->m_sSpecialRenderData.rounding = false; PWINDOW->m_sSpecialRenderData.shadow = false; - const auto RESERVED = PWINDOW->getFullWindowReservedArea(); - - const int BORDERSIZE = PWINDOW->getRealBorderSize(); + PWINDOW->updateWindowDecos(); - PWINDOW->m_vRealPosition = PWINDOW->m_vPosition + Vector2D(BORDERSIZE, BORDERSIZE) + RESERVED.topLeft; - PWINDOW->m_vRealSize = PWINDOW->m_vSize - Vector2D(2 * BORDERSIZE, 2 * BORDERSIZE) - (RESERVED.topLeft + RESERVED.bottomRight); + const auto RESERVED = PWINDOW->getFullWindowReservedArea(); - PWINDOW->updateWindowDecos(); + PWINDOW->m_vRealPosition = PWINDOW->m_vPosition + RESERVED.topLeft; + PWINDOW->m_vRealSize = PWINDOW->m_vSize - (RESERVED.topLeft + RESERVED.bottomRight); g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.goalv()); return; } - const int BORDERSIZE = PWINDOW->getRealBorderSize(); - - auto calcPos = PWINDOW->m_vPosition + Vector2D(BORDERSIZE, BORDERSIZE); - auto calcSize = PWINDOW->m_vSize - Vector2D(2 * BORDERSIZE, 2 * BORDERSIZE); + auto calcPos = PWINDOW->m_vPosition; + auto calcSize = PWINDOW->m_vSize; const auto OFFSETTOPLEFT = Vector2D(DISPLAYLEFT ? gapsOut : gapsIn, DISPLAYTOP ? gapsOut : gapsIn); |
