summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2023-11-11 14:37:17 +0000
committerGitHub <noreply@github.com>2023-11-11 14:37:17 +0000
commit9be6fbf5eae8c4b902b818881a4dc34f87bb630d (patch)
treea5d440cd8f5d57a659df670548263eba1cd93a0a /src/layout/MasterLayout.cpp
parent7345b1a1ea2671953df48c8a18524a7e556d383c (diff)
decorations: Decoration Positioner (#3800)
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index 57784786..d355a7d3 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -99,7 +99,7 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection direc
if (!(wd->getDecorationFlags() & DECORATION_ALLOWS_MOUSE_INPUT))
continue;
- if (wd->getWindowDecorationRegion().containsPoint(MOUSECOORDS)) {
+ if (g_pDecorationPositioner->getWindowDecorationBox(wd.get()).containsPoint(MOUSECOORDS)) {
if (!wd->onEndWindowDragOnDeco(pWindow, MOUSECOORDS))
return;
break;
@@ -111,9 +111,6 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection direc
if (OPENINGON && OPENINGON != PNODE && OPENINGON->pWindow->m_sGroupData.pNextWindow // target is group
&& pWindow->canBeGroupedInto(OPENINGON->pWindow)) {
- if (!pWindow->m_sGroupData.pNextWindow)
- pWindow->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(pWindow));
-
m_lMasterNodesData.remove(*PNODE);
static const auto* USECURRPOS = &g_pConfigManager->getConfigValuePtr("group:insert_after_current")->intValue;
@@ -124,6 +121,9 @@ void CHyprMasterLayout::onWindowCreatedTiling(CWindow* pWindow, eDirection direc
pWindow->updateWindowDecos();
recalculateWindow(pWindow);
+ if (!pWindow->getDecorationByType(DECORATION_GROUPBAR))
+ pWindow->addWindowDeco(std::make_unique<CHyprGroupBarDecoration>(pWindow));
+
return;
}