modules/hyprland/workspaces: remove unneccesary visibleWorkspaces variable
This commit is contained in:
parent
1b3b45779a
commit
0055ee6910
|
@ -100,7 +100,7 @@ class Workspaces : public AModule, public EventHandler {
|
||||||
void removeWorkspacesToRemove();
|
void removeWorkspacesToRemove();
|
||||||
void createWorkspacesToCreate();
|
void createWorkspacesToCreate();
|
||||||
std::vector<std::string> getVisibleWorkspaces();
|
std::vector<std::string> getVisibleWorkspaces();
|
||||||
void updateWorkspaceStates(const std::vector<std::string>& visibleWorkspaces);
|
void updateWorkspaceStates();
|
||||||
bool updateWindowsToCreate();
|
bool updateWindowsToCreate();
|
||||||
|
|
||||||
void extendOrphans(int workspaceId, Json::Value const& clientsJson);
|
void extendOrphans(int workspaceId, Json::Value const& clientsJson);
|
||||||
|
|
|
@ -128,10 +128,7 @@ void Workspaces::doUpdate() {
|
||||||
|
|
||||||
removeWorkspacesToRemove();
|
removeWorkspacesToRemove();
|
||||||
createWorkspacesToCreate();
|
createWorkspacesToCreate();
|
||||||
|
updateWorkspaceStates();
|
||||||
std::vector<std::string> visibleWorkspaces = getVisibleWorkspaces();
|
|
||||||
|
|
||||||
updateWorkspaceStates(visibleWorkspaces);
|
|
||||||
updateWindowCount();
|
updateWindowCount();
|
||||||
sortWorkspaces();
|
sortWorkspaces();
|
||||||
|
|
||||||
|
@ -870,7 +867,8 @@ bool Workspaces::updateWindowsToCreate() {
|
||||||
return anyWindowCreated;
|
return anyWindowCreated;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Workspaces::updateWorkspaceStates(const std::vector<std::string> &visibleWorkspaces) {
|
void Workspaces::updateWorkspaceStates() {
|
||||||
|
const std::vector<std::string> visibleWorkspaces = getVisibleWorkspaces();
|
||||||
auto updatedWorkspaces = gIPC->getSocket1JsonReply("workspaces");
|
auto updatedWorkspaces = gIPC->getSocket1JsonReply("workspaces");
|
||||||
for (auto &workspace : m_workspaces) {
|
for (auto &workspace : m_workspaces) {
|
||||||
workspace->setActive(workspace->name() == m_activeWorkspaceName ||
|
workspace->setActive(workspace->name() == m_activeWorkspaceName ||
|
||||||
|
|
Loading…
Reference in New Issue