[fix] fix tab close button not working in stream window

This commit is contained in:
dijunkun
2025-12-05 15:18:35 +08:00
parent 5c23f1c5e8
commit 46f45ed216

View File

@@ -170,6 +170,20 @@ int Render::StreamWindow() {
ImGui::EndTabItem(); ImGui::EndTabItem();
} else { } else {
props->tab_selected_ = false; props->tab_selected_ = false;
if (!props->tab_opened_) {
std::string remote_id_to_close = props->remote_id_;
// lock.unlock();
{
// std::unique_lock unique_lock(client_properties_mutex_);
auto close_it = client_properties_.find(remote_id_to_close);
if (close_it != client_properties_.end()) {
CloseTab(close_it);
}
}
// lock.lock();
it = client_properties_.begin();
continue;
}
++it; ++it;
} }
} }