fix getWindowDecorationRegion with internal_border

modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
modified:   src/render/decorations/IHyprWindowDecoration.cpp

Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com>
This commit is contained in:
MightyPlaza 2023-09-06 17:08:18 +01:00
parent ddb49c1bef
commit 71e9b7cb5b
No known key found for this signature in database
GPG key ID: 284C27FD27A6DC0D
2 changed files with 2 additions and 2 deletions

View file

@ -195,7 +195,7 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
} }
SWindowDecorationExtents CHyprGroupBarDecoration::getWindowDecorationReservedArea() { SWindowDecorationExtents CHyprGroupBarDecoration::getWindowDecorationReservedArea() {
return {{0, m_bOnTop ? m_iBarFullHeight : 0}, {0, m_bOnTop ? 0 : m_iBarFullHeight}}; return m_seExtents;
} }
CTitleTex* CHyprGroupBarDecoration::textureFromTitle(const std::string& title) { CTitleTex* CHyprGroupBarDecoration::textureFromTitle(const std::string& title) {

View file

@ -14,7 +14,7 @@ SWindowDecorationExtents IHyprWindowDecoration::getWindowDecorationReservedArea(
CRegion IHyprWindowDecoration::getWindowDecorationRegion() { CRegion IHyprWindowDecoration::getWindowDecorationRegion() {
const SWindowDecorationExtents RESERVED = getWindowDecorationReservedArea(); const SWindowDecorationExtents RESERVED = getWindowDecorationReservedArea();
const int BORDERSIZE = m_pWindow->getRealBorderSize(); const int BORDERSIZE = RESERVED.isInternalDecoration ? 0 : m_pWindow->getRealBorderSize();
return CRegion(m_pWindow->m_vRealPosition.vec().x - (BORDERSIZE + RESERVED.topLeft.x) * (int)(RESERVED.topLeft.x != 0), return CRegion(m_pWindow->m_vRealPosition.vec().x - (BORDERSIZE + RESERVED.topLeft.x) * (int)(RESERVED.topLeft.x != 0),
m_pWindow->m_vRealPosition.vec().y - (BORDERSIZE + RESERVED.topLeft.y) * (int)(RESERVED.topLeft.y != 0), m_pWindow->m_vRealPosition.vec().y - (BORDERSIZE + RESERVED.topLeft.y) * (int)(RESERVED.topLeft.y != 0),
m_pWindow->m_vRealSize.vec().x + (BORDERSIZE + RESERVED.topLeft.x) * (int)(RESERVED.topLeft.x != 0) + m_pWindow->m_vRealSize.vec().x + (BORDERSIZE + RESERVED.topLeft.x) * (int)(RESERVED.topLeft.x != 0) +