mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 06:25:59 +01:00
layout: deny auto-grouping a new floating window into a tiled group (#8108)
This commit is contained in:
parent
abfd550ee2
commit
e7fd0f5aec
1 changed files with 11 additions and 6 deletions
|
@ -186,12 +186,17 @@ bool IHyprLayout::onWindowCreatedAutoGroup(PHLWINDOW pWindow) {
|
|||
g_pCompositor->m_pLastWindow.lock() :
|
||||
g_pCompositor->getFirstWindowOnWorkspace(pWindow->workspaceID());
|
||||
|
||||
if (*PAUTOGROUP // check if auto_group is enabled.
|
||||
&& OPENINGON // check if OPENINGON exists.
|
||||
&& OPENINGON != pWindow // fixes a freeze when activating togglefloat to transform a floating group into a tiled group.
|
||||
&& OPENINGON->m_sGroupData.pNextWindow.lock() // check if OPENINGON is a group
|
||||
&& pWindow->canBeGroupedInto(OPENINGON) // check if the new window can be grouped into OPENINGON
|
||||
&& !g_pXWaylandManager->shouldBeFloated(pWindow)) { // don't group XWayland windows that should be floated.
|
||||
bool denied = false;
|
||||
if (pWindow->m_bIsFloating && !OPENINGON->m_bIsFloating)
|
||||
denied = true;
|
||||
|
||||
if (*PAUTOGROUP // check if auto_group is enabled.
|
||||
&& OPENINGON // check if OPENINGON exists.
|
||||
&& OPENINGON != pWindow // fixes a freeze when activating togglefloat to transform a floating group into a tiled group.
|
||||
&& OPENINGON->m_sGroupData.pNextWindow.lock() // check if OPENINGON is a group.
|
||||
&& pWindow->canBeGroupedInto(OPENINGON) // check if the new window can be grouped into OPENINGON.
|
||||
&& !g_pXWaylandManager->shouldBeFloated(pWindow) // don't group a new window that should be floated.
|
||||
&& !denied) { // don't group a new floated window into a tiled group.
|
||||
|
||||
pWindow->m_bIsFloating = OPENINGON->m_bIsFloating; // match the floating state
|
||||
|
||||
|
|
Loading…
Reference in a new issue