diff options
| author | Sungyoon Cho <sungyoon@sungyooncho.dev> | 2024-04-09 20:08:38 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-09 12:08:38 +0100 |
| commit | fcac25bcc2496dc248e9ee912d95ec38b5397acd (patch) | |
| tree | e86dfd34d6f26dbcc4ea14978d7d447a2efa7ffc /src/Compositor.cpp | |
| parent | f6786f04d2bf46baf01b2a1a3686871ef46f59e9 (diff) | |
workspace: Add count group flag in windowCount workspace selector prop (#5499)
* Add groupCount workspace selector prop
* Intergrate groupCount with windowCount
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index fee98f8e..8a717600 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1280,6 +1280,16 @@ int CCompositor::getWindowsOnWorkspace(const int& id, std::optional<bool> onlyTi return no; } +int CCompositor::getGroupsOnWorkspace(const int& id, std::optional<bool> onlyTiled) { + int no = 0; + for (auto& w : m_vWindows) { + if (w->workspaceID() == id && w->m_bIsMapped && !(onlyTiled.has_value() && !w->m_bIsFloating != onlyTiled.value()) && w->m_sGroupData.head) + no++; + } + + return no; +} + CWindow* CCompositor::getUrgentWindow() { for (auto& w : m_vWindows) { if (w->m_bIsMapped && w->m_bIsUrgent) |
