mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
Taskbar: More bringup work. We now see a basic window list.
This commit is contained in:
parent
ea801a99dc
commit
96104b5524
20 changed files with 339 additions and 12 deletions
17
Applications/Taskbar/WindowList.cpp
Normal file
17
Applications/Taskbar/WindowList.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#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);
|
||||
auto& window_ref = *window;
|
||||
m_windows.set(identifier, move(window));
|
||||
return window_ref;
|
||||
}
|
||||
|
||||
void WindowList::remove_window(const WindowIdentifier& identifier)
|
||||
{
|
||||
m_windows.remove(identifier);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue