mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 15:41:58 -07:00
layout: add missing groupbar decoration to the window (#3235)
* fix: add missing groupbar decoration to the window Add groupbar decoration to the operand window of `CWindow::insertWindowToGroup` if it does not exist, to prevent segmentation faults when mouse events are triggered after moving the window to a group, where `getDecorationByType(DECORATION_GROUPBAR)` unexpectedly returns nullptr. Also fixed a bug where the group bar disappeared when the moveIntoGroup dispatcher's operand window was in a group. * Update Window.cpp
This commit is contained in:
@@ -733,6 +733,9 @@ void CWindow::insertWindowToGroup(CWindow* pWindow) {
|
||||
const auto BEGINAT = this;
|
||||
const auto ENDAT = m_sGroupData.pNextWindow;
|
||||
|
||||
if (!pWindow->getDecorationByType(DECORATION_GROUPBAR))
|
||||
pWindow->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(pWindow));
|
||||
|
||||
if (!pWindow->m_sGroupData.pNextWindow) {
|
||||
BEGINAT->m_sGroupData.pNextWindow = pWindow;
|
||||
pWindow->m_sGroupData.pNextWindow = ENDAT;
|
||||
|
Reference in New Issue
Block a user