summaryrefslogtreecommitdiff
path: root/src/desktop/view/Window.cpp
diff options
context:
space:
mode:
authorAndré Silva <123550+andresilva@users.noreply.github.com>2026-03-03 20:56:02 +0000
committerGitHub <noreply@github.com>2026-03-03 20:56:02 +0000
commitedf7098345b4498e937d25ace9d9b535c0eade34 (patch)
treeef98d600d717435bb819bae1d7e7131be392d652 /src/desktop/view/Window.cpp
parent7299a3b0d5332da030e980e60b0ee35b93387cff (diff)
desktop/window: fix floating windows being auto-grouped (#13475)
--------- Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
Diffstat (limited to 'src/desktop/view/Window.cpp')
-rw-r--r--src/desktop/view/Window.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp
index 77c5f330..5d414c49 100644
--- a/src/desktop/view/Window.cpp
+++ b/src/desktop/view/Window.cpp
@@ -1947,11 +1947,12 @@ void CWindow::mapWindow() {
g_pEventManager->postEvent(SHyprIPCEvent{"openwindow", std::format("{:x},{},{},{}", m_self.lock(), PWORKSPACE->m_name, m_class, m_title)});
Event::bus()->m_events.window.openEarly.emit(m_self.lock());
- if (*PAUTOGROUP // auto_group enabled
- && Desktop::focusState()->window() // focused window exists
- && canBeGroupedInto(Desktop::focusState()->window()->m_group) // we can group
- && Desktop::focusState()->window()->m_workspace == m_workspace // workspaces match, we're not opening on another ws
- && !isModal() && !(parent() && m_isFloating) && !isX11OverrideRedirect() // not a modal, floating child or X11 OR
+ if (*PAUTOGROUP // auto_group enabled
+ && Desktop::focusState()->window() // focused window exists
+ && canBeGroupedInto(Desktop::focusState()->window()->m_group) // we can group
+ && Desktop::focusState()->window()->m_workspace == m_workspace // workspaces match, we're not opening on another ws
+ && !g_pXWaylandManager->shouldBeFloated(m_self.lock()) && !isX11OverrideRedirect() // not a window that should float or X11
+ && !(m_isFloating && !Desktop::focusState()->window()->m_isFloating) // do not auto-group a floated window into a tiled group
) {
// add to group if we are focused on one
Desktop::focusState()->window()->m_group->add(m_self.lock());