feat: add orphan windows attribute to workspaces

this attribute will keep every window that doesn't have an associated
workspace in the current bar
This commit is contained in:
Brenno Lemos
2024-01-08 17:10:13 -03:00
parent 748fc809b5
commit 512c6fb127
2 changed files with 50 additions and 6 deletions

View File

@ -163,10 +163,18 @@ class Workspaces : public AModule, public EventHandler {
void doUpdate();
void extendOrphans(int workspaceId, Json::Value const& clientsJson);
void registerOrphanWindow(WindowCreationPayload create_window_paylod);
bool m_allOutputs = false;
bool m_showSpecial = false;
bool m_activeOnly = false;
// Map for windows stored in workspaces not present in the current bar.
// This happens when the user has multiple monitors (hence, multiple bars)
// and doesn't share windows accross bars (a.k.a `all-outputs` = false)
std::map<WindowAddress, std::string> m_orphanWindowMap;
enum class SortMethod { ID, NAME, NUMBER, DEFAULT };
util::EnumParser<SortMethod> m_enumParser;
SortMethod m_sortBy = SortMethod::DEFAULT;