Skip to content

Commit

Permalink
fix: window-rewrite loading
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jan 5, 2024
1 parent 2674982 commit 14fa41c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/modules/hyprland/workspaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Workspaces::Workspaces(const std::string &id, const Bar &bar, const Json::Value
gIPC = std::make_unique<IPC>();
}

init();
registerIpc();
init();
}

auto Workspaces::parseConfig(const Json::Value &config) -> void {
Expand Down Expand Up @@ -180,7 +180,10 @@ auto Workspaces::update() -> void {
}
}

auto clients_data = gIPC->getSocket1JsonReply("clients");
for (auto &workspace : m_workspaces) {
workspace->initializeWindowMap(clients_data);

// active
workspace->setActive(workspace->name() == m_activeWorkspaceName);
// disable urgency if workspace is active
Expand Down Expand Up @@ -500,6 +503,9 @@ void Workspaces::createWorkspace(Json::Value const &workspace_data,

// create new workspace
m_workspaces.emplace_back(std::make_unique<Workspace>(workspace_data, *this, clients_data));

// Initialize the window map for the created workspace
m_workspaces.back()->initializeWindowMap(clients_data);
Gtk::Button &newWorkspaceButton = m_workspaces.back()->button();
m_box.pack_start(newWorkspaceButton, false, false);
sortWorkspaces();
Expand Down

0 comments on commit 14fa41c

Please sign in to comment.