aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/layout
diff options
context:
space:
mode:
authorAqa-Ib <[email protected]>2024-10-16 09:59:47 +0000
committerGitHub <[email protected]>2024-10-16 10:59:47 +0100
commitace803948aaed6328342ea57e81adc1a01236c71 (patch)
tree2f5a42bd8b48fa75e2b4ba5fac2290a79bf153d4 /src/layout
parent01c2ff34ddcb5995409c33c2b549e93b98b56d6b (diff)
downloadHyprland-ace803948aaed6328342ea57e81adc1a01236c71.tar.gz
Hyprland-ace803948aaed6328342ea57e81adc1a01236c71.zip
layout: enable group rules for new floating windows (#8122)
* layout: enable group rules for new floating windows * fix comment * do not apply group rules to a new floating window if it shouldBeFloated. fixes child windows * comment
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/IHyprLayout.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index fa3f8b8d..892ed12c 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -82,6 +82,8 @@ 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);
@@ -193,7 +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.
&& pWindow->canBeGroupedInto(OPENINGON) // check if the new window can be grouped into OPENINGON.
- && !g_pXWaylandManager->shouldBeFloated(pWindow) // fixes the popups of XWayland programs running in a floating group.
+ && !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).
pWindow->m_bIsFloating = OPENINGON->m_bIsFloating; // match the floating state. Needed to autogroup a new tiled window into a floated group.