diff --git a/Userland/Services/NotificationServer/NotificationWindow.cpp b/Userland/Services/NotificationServer/NotificationWindow.cpp index 696436b2b2..ed5953c2f2 100644 --- a/Userland/Services/NotificationServer/NotificationWindow.cpp +++ b/Userland/Services/NotificationServer/NotificationWindow.cpp @@ -128,4 +128,10 @@ NotificationWindow::~NotificationWindow() { } +RefPtr NotificationWindow::get_window_by_id(i32 id) +{ + auto window = s_windows.get(id); + return window.value_or(nullptr); +} + } diff --git a/Userland/Services/NotificationServer/NotificationWindow.h b/Userland/Services/NotificationServer/NotificationWindow.h index f2654ddda7..48169663b3 100644 --- a/Userland/Services/NotificationServer/NotificationWindow.h +++ b/Userland/Services/NotificationServer/NotificationWindow.h @@ -39,6 +39,8 @@ public: virtual ~NotificationWindow() override; void set_original_rect(Gfx::IntRect original_rect) { m_original_rect = original_rect; }; + static RefPtr get_window_by_id(i32 id); + private: NotificationWindow(i32 client_id, const String& text, const String& title, const Gfx::ShareableBitmap&);