mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 09:26:00 +01:00
add custom getWindowDecorationRegion for groupbar
modified: src/render/decorations/CHyprGroupBarDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.hpp Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com>
This commit is contained in:
parent
cc26620121
commit
4ed0cd74d1
2 changed files with 12 additions and 0 deletions
|
@ -363,6 +363,16 @@ void CHyprGroupBarDecoration::forceReload(CWindow* pWindow) {
|
|||
refreshGradients();
|
||||
}
|
||||
|
||||
CRegion CHyprGroupBarDecoration::getWindowDecorationRegion() {
|
||||
const int ROUNDING = !m_pWindow->m_sSpecialRenderData.rounding ? 0 : m_pWindow->rounding();
|
||||
const int BORDERSIZE = m_pWindow->getRealBorderSize();
|
||||
return CRegion(m_vLastWindowPos.x + ROUNDING,
|
||||
m_vLastWindowPos.y +
|
||||
(m_bOnTop ? -BAR_INTERNAL_PADDING - m_iBarInternalHeight - (m_bInternalBorder ? 0 : BORDERSIZE) :
|
||||
m_vLastWindowSize.y + BAR_INTERNAL_PADDING + (m_bInternalBorder ? 0 : BORDERSIZE)),
|
||||
m_vLastWindowSize.x - 2 * ROUNDING, m_iBarInternalHeight);
|
||||
}
|
||||
|
||||
bool CHyprGroupBarDecoration::allowsInput() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,8 @@ class CHyprGroupBarDecoration : public IHyprWindowDecoration {
|
|||
|
||||
virtual SWindowDecorationExtents getWindowDecorationReservedArea();
|
||||
|
||||
virtual CRegion getWindowDecorationRegion();
|
||||
|
||||
virtual void forceReload(CWindow*);
|
||||
|
||||
virtual bool allowsInput();
|
||||
|
|
Loading…
Reference in a new issue