1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 17:45:08 +00:00
serenity/Applications/Taskbar/WindowList.cpp

18 lines
494 B
C++

#include "WindowList.h"
Window& WindowList::ensure_window(const WindowIdentifier& identifier)
{
auto it = m_windows.find(identifier);
if (it != m_windows.end())
return *it->value;
auto window = make<Window>(identifier);
window->set_button(aid_create_button());
auto& window_ref = *window;
m_windows.set(identifier, move(window));
return window_ref;
}
void WindowList::remove_window(const WindowIdentifier& identifier)
{
m_windows.remove(identifier);
}