Skip to content

Commit

Permalink
remove repeated check
Browse files Browse the repository at this point in the history
  • Loading branch information
Aqa-Ib committed Sep 26, 2024
1 parent 1ad7481 commit 31af287
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/layout/DwindleLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,8 @@ void CHyprDwindleLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dir
static auto AUTOGROUP = CConfigValue<Hyprlang::INT>("group:auto_group");
// Auto group the new tiling window if the focused window is a open group
if ((*AUTOGROUP || g_pInputManager->m_bWasDraggingWindow) && g_pCompositor->m_pLastWindow.lock() && g_pCompositor->m_pLastWindow->m_pWorkspace == pWindow->m_pWorkspace &&
getNodeFromWindow(g_pCompositor->m_pLastWindow.lock()) != PNODE && g_pCompositor->m_pLastWindow &&
g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow // target: active group
&& pWindow->canBeGroupedInto(g_pCompositor->m_pLastWindow.lock()) && !m_vOverrideFocalPoint) { // we are not moving window
getNodeFromWindow(g_pCompositor->m_pLastWindow.lock()) != PNODE && g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow // target: active group
&& pWindow->canBeGroupedInto(g_pCompositor->m_pLastWindow.lock()) && !m_vOverrideFocalPoint) { // we are not moving window

m_lDwindleNodesData.remove(*PNODE);

Expand Down
2 changes: 1 addition & 1 deletion src/layout/IHyprLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
// Auto group the new floating window if the focused window is a open group
static auto AUTOGROUP = CConfigValue<Hyprlang::INT>("group:auto_group");
if ((*AUTOGROUP || g_pInputManager->m_bWasDraggingWindow) && g_pCompositor->m_pLastWindow.lock() && g_pCompositor->m_pLastWindow->m_pWorkspace == pWindow->m_pWorkspace &&
g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow // target: active group
g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow // target: active group
&& pWindow->canBeGroupedInto(g_pCompositor->m_pLastWindow.lock())) {

if (!g_pCompositor->m_pLastWindow->m_bIsFloating) { // target: focused tiled group
Expand Down
3 changes: 1 addition & 2 deletions src/layout/MasterLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ void CHyprMasterLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dire
static auto AUTOGROUP = CConfigValue<Hyprlang::INT>("group:auto_group");
// Auto group the new tiling window if the focused window is a open group
if ((*AUTOGROUP || g_pInputManager->m_bWasDraggingWindow) && g_pCompositor->m_pLastWindow.lock() && g_pCompositor->m_pLastWindow->m_pWorkspace == pWindow->m_pWorkspace &&
getNodeFromWindow(g_pCompositor->m_pLastWindow.lock()) != PNODE && g_pCompositor->m_pLastWindow &&
g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow // target: active group
getNodeFromWindow(g_pCompositor->m_pLastWindow.lock()) != PNODE && g_pCompositor->m_pLastWindow->m_sGroupData.pNextWindow // target: active group
&& pWindow->canBeGroupedInto(g_pCompositor->m_pLastWindow.lock())) {

m_lMasterNodesData.remove(*PNODE);
Expand Down

0 comments on commit 31af287

Please sign in to comment.