1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

WindowServer+TaskBar: Add a taskbar window button popup menu.

This patch only hooks up the minimize and unminimize actions.
This commit is contained in:
Andreas Kling 2019-04-23 23:14:14 +02:00
parent c5c4e54a67
commit 956bd23aae
17 changed files with 158 additions and 56 deletions

View file

@ -2,6 +2,14 @@
#include <WindowServer/WSAPITypes.h>
#include <LibGUI/GEventLoop.h>
WindowList& WindowList::the()
{
static WindowList* s_the;
if (!s_the)
s_the = new WindowList;
return *s_the;
}
Window* WindowList::window(const WindowIdentifier& identifier)
{
auto it = m_windows.find(identifier);
@ -16,7 +24,7 @@ Window& WindowList::ensure_window(const WindowIdentifier& identifier)
if (it != m_windows.end())
return *it->value;
auto window = make<Window>(identifier);
window->set_button(aid_create_button());
window->set_button(aid_create_button(identifier));
window->button()->on_click = [identifier] (GButton&) {
WSAPI_ClientMessage message;
message.type = WSAPI_ClientMessage::Type::WM_SetActiveWindow;