mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 22:51:58 -07:00
workspace: Add count group flag in windowCount workspace selector prop (#5499)
* Add groupCount workspace selector prop * Intergrate groupCount with windowCount
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user