workspace taskbars: Fix title not updating

This seems to be an old bug that has been made visible with the new workspace taskbars feature.
Sometimes, when closing a window and re-opening a window of the same program, hyprland reuses the window address. Since m_orphanWindowMap was not being cleaned up on window close, the new window would not be updated properly.
This commit is contained in:
Pol Rivero
2025-01-01 10:52:56 +01:00
parent fdb9004048
commit 5e1d6d1cc5

View File

@ -466,6 +466,7 @@ void Workspaces::onWindowOpened(std::string const &payload) {
void Workspaces::onWindowClosed(std::string const &addr) { void Workspaces::onWindowClosed(std::string const &addr) {
spdlog::trace("Window closed: {}", addr); spdlog::trace("Window closed: {}", addr);
updateWindowCount(); updateWindowCount();
m_orphanWindowMap.erase(addr);
for (auto &workspace : m_workspaces) { for (auto &workspace : m_workspaces) {
if (workspace->closeWindow(addr)) { if (workspace->closeWindow(addr)) {
break; break;