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 createWorkspacesToCreate();
|
||||
std::vector<std::string> getVisibleWorkspaces();
|
||||
void updateWorkspaceStates(const std::vector<std::string>& visibleWorkspaces);
|
||||
void updateWorkspaceStates();
|
||||
bool updateWindowsToCreate();
|
||||
|
||||
void extendOrphans(int workspaceId, Json::Value const& clientsJson);
|
||||
|
|
|
@ -128,10 +128,7 @@ void Workspaces::doUpdate() {
|
|||
|
||||
removeWorkspacesToRemove();
|
||||
createWorkspacesToCreate();
|
||||
|
||||
std::vector<std::string> visibleWorkspaces = getVisibleWorkspaces();
|
||||
|
||||
updateWorkspaceStates(visibleWorkspaces);
|
||||
updateWorkspaceStates();
|
||||
updateWindowCount();
|
||||
sortWorkspaces();
|
||||
|
||||
|
@ -870,7 +867,8 @@ bool Workspaces::updateWindowsToCreate() {
|
|||
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");
|
||||
for (auto &workspace : m_workspaces) {
|
||||
workspace->setActive(workspace->name() == m_activeWorkspaceName ||
|
||||
|
|
Loading…
Reference in New Issue