mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 09:09:48 +01: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:
parent
19bbdeed47
commit
79862c957c
1 changed files with 3 additions and 0 deletions
|
@ -733,6 +733,9 @@ void CWindow::insertWindowToGroup(CWindow* pWindow) {
|
||||||
const auto BEGINAT = this;
|
const auto BEGINAT = this;
|
||||||
const auto ENDAT = m_sGroupData.pNextWindow;
|
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) {
|
if (!pWindow->m_sGroupData.pNextWindow) {
|
||||||
BEGINAT->m_sGroupData.pNextWindow = pWindow;
|
BEGINAT->m_sGroupData.pNextWindow = pWindow;
|
||||||
pWindow->m_sGroupData.pNextWindow = ENDAT;
|
pWindow->m_sGroupData.pNextWindow = ENDAT;
|
||||||
|
|
Loading…
Reference in a new issue