Refactor ClientManager::clear
This commit is contained in:
parent
69663bdc81
commit
f732ea4efb
|
@ -19,11 +19,10 @@ ClientManager::~ClientManager()
|
||||||
|
|
||||||
void ClientManager::clear()
|
void ClientManager::clear()
|
||||||
{
|
{
|
||||||
// So that clients destructor find the client manager empty
|
while (not m_clients.empty())
|
||||||
// so that local UI does not fork.
|
remove_client(*m_clients.front(), true, 0);
|
||||||
ClientList clients = std::move(m_clients);
|
|
||||||
clients.clear();
|
|
||||||
m_client_trash.clear();
|
m_client_trash.clear();
|
||||||
|
|
||||||
for (auto& window : m_free_windows)
|
for (auto& window : m_free_windows)
|
||||||
window.window->run_hook_in_own_context(Hook::WinClose,
|
window.window->run_hook_in_own_context(Hook::WinClose,
|
||||||
window.window->buffer().name());
|
window.window->buffer().name());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user