diff options
| author | nyx <nnyyxxxx@protonmail.com> | 2025-02-08 09:05:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-08 15:05:44 +0100 |
| commit | feb8ad48f0153a15b96356f280dbd04849db0e04 (patch) | |
| tree | 4eb8ef02ed1bec351b812ab80e0edd092fe04114 /src/desktop/Window.cpp | |
| parent | f7fcbe32c9f66bcfc86853a5cda95edcf481f573 (diff) | |
groups: deactivate unfocused windows in groups (#9354)
Diffstat (limited to 'src/desktop/Window.cpp')
| -rw-r--r-- | src/desktop/Window.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index b0d7b58c..7c0cb741 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1748,3 +1748,19 @@ void CWindow::setContentType(NContentType::eContentType contentType) { Debug::log(INFO, "ContentType for window {}", (int)contentType); m_pWLSurface->resource()->contentType->value = contentType; } + +void CWindow::deactivateGroupMembers() { + auto curr = getGroupHead(); + while (curr) { + if (curr != m_pSelf.lock()) { + if (curr->m_bIsX11) + curr->m_pXWaylandSurface->activate(false); + else if (curr->m_pXDGSurface && curr->m_pXDGSurface->toplevel) + curr->m_pXDGSurface->toplevel->setActive(false); + } + + curr = curr->m_sGroupData.pNextWindow.lock(); + if (curr == getGroupHead()) + break; + } +} |
