mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 09:05:58 +01:00
layout: move applyGroupRules() to onWindowCreated() (#8139)
This commit is contained in:
parent
781828a56e
commit
86e9f69a69
4 changed files with 4 additions and 10 deletions
|
@ -308,8 +308,6 @@ void CHyprDwindleLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dir
|
|||
|
||||
applyNodeDataToWindow(PNODE);
|
||||
|
||||
pWindow->applyGroupRules();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -450,8 +448,6 @@ void CHyprDwindleLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dir
|
|||
NEWPARENT->recalcSizePosRecursive(false, horizontalOverride, verticalOverride);
|
||||
|
||||
recalculateMonitor(pWindow->m_iMonitorID);
|
||||
|
||||
pWindow->applyGroupRules();
|
||||
}
|
||||
|
||||
void CHyprDwindleLayout::onWindowRemovedTiling(PHLWINDOW pWindow) {
|
||||
|
|
|
@ -20,6 +20,9 @@ void IHyprLayout::onWindowCreated(PHLWINDOW pWindow, eDirection direction) {
|
|||
|
||||
pWindow->m_vPseudoSize = pWindow->m_vLastFloatingSize;
|
||||
|
||||
if (!g_pXWaylandManager->shouldBeFloated(pWindow)) // do not apply group rules to child windows
|
||||
pWindow->applyGroupRules();
|
||||
|
||||
bool autoGrouped = IHyprLayout::onWindowCreatedAutoGroup(pWindow);
|
||||
if (autoGrouped)
|
||||
return;
|
||||
|
@ -82,8 +85,6 @@ void IHyprLayout::onWindowRemovedFloating(PHLWINDOW pWindow) {
|
|||
}
|
||||
|
||||
void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
|
||||
if (!g_pXWaylandManager->shouldBeFloated(pWindow)) // do not apply group rules to child windows
|
||||
pWindow->applyGroupRules();
|
||||
|
||||
CBox desiredGeometry = {0};
|
||||
g_pXWaylandManager->getGeometryForWindow(pWindow, &desiredGeometry);
|
||||
|
@ -194,6 +195,7 @@ bool IHyprLayout::onWindowCreatedAutoGroup(PHLWINDOW pWindow) {
|
|||
|
||||
if (*PAUTOGROUP // check if auto_group is enabled.
|
||||
&& OPENINGON->m_sGroupData.pNextWindow.lock() // check if OPENINGON is a group.
|
||||
&& OPENINGON != pWindow // prevent freeze when the "group set" window rule makes the new window to be already a group.
|
||||
&& pWindow->canBeGroupedInto(OPENINGON) // check if the new window can be grouped into OPENINGON.
|
||||
&& !g_pXWaylandManager->shouldBeFloated(pWindow) // don't group child windows. Fix for floated groups. Tiled groups don't need this because we check if !denied.
|
||||
&& !denied) { // don't group a new floated window into a tiled group (for convenience).
|
||||
|
@ -204,7 +206,6 @@ bool IHyprLayout::onWindowCreatedAutoGroup(PHLWINDOW pWindow) {
|
|||
(*USECURRPOS ? OPENINGON : OPENINGON->getGroupTail())->insertWindowToGroup(pWindow);
|
||||
|
||||
OPENINGON->setGroupCurrent(pWindow);
|
||||
pWindow->applyGroupRules();
|
||||
pWindow->updateWindowDecos();
|
||||
recalculateWindow(pWindow);
|
||||
|
||||
|
|
|
@ -116,8 +116,6 @@ void CHyprMasterLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dire
|
|||
return;
|
||||
}
|
||||
|
||||
pWindow->applyGroupRules();
|
||||
|
||||
static auto PDROPATCURSOR = CConfigValue<Hyprlang::INT>("master:drop_at_cursor");
|
||||
eOrientation orientation = getDynamicOrientation(pWindow->m_pWorkspace);
|
||||
const auto NODEIT = std::find(m_lMasterNodesData.begin(), m_lMasterNodesData.end(), *PNODE);
|
||||
|
|
|
@ -466,7 +466,6 @@ bool CHyprGroupBarDecoration::onEndWindowDragOnDeco(const Vector2D& pos, PHLWIND
|
|||
std::swap(pDraggedHead->m_sGroupData.head, pWindowInsertEnd->m_sGroupData.head);
|
||||
|
||||
m_pWindow->setGroupCurrent(pDraggedWindow);
|
||||
pDraggedWindow->applyGroupRules();
|
||||
pDraggedWindow->updateWindowDecos();
|
||||
g_pLayoutManager->getCurrentLayout()->recalculateWindow(pDraggedWindow);
|
||||
|
||||
|
|
Loading…
Reference in a new issue