mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
Notification: Allow getting window by ID
This is a neccessity so a connection can get the notification it is connected to for later updates.
This commit is contained in:
parent
a437430294
commit
f2814dd6c1
Notes:
sideshowbarker
2024-07-18 21:09:37 +09:00
Author: https://github.com/Sylvyrfysh Commit: https://github.com/SerenityOS/serenity/commit/f2814dd6c17 Pull-request: https://github.com/SerenityOS/serenity/pull/5732 Reviewed-by: https://github.com/BenWiederhake
@ -128,4 +128,10 @@ NotificationWindow::~NotificationWindow()
|
||||
{
|
||||
}
|
||||
|
||||
RefPtr<NotificationWindow> NotificationWindow::get_window_by_id(i32 id)
|
||||
{
|
||||
auto window = s_windows.get(id);
|
||||
return window.value_or(nullptr);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,6 +39,8 @@ public:
|
||||
virtual ~NotificationWindow() override;
|
||||
void set_original_rect(Gfx::IntRect original_rect) { m_original_rect = original_rect; };
|
||||
|
||||
static RefPtr<NotificationWindow> get_window_by_id(i32 id);
|
||||
|
||||
private:
|
||||
NotificationWindow(i32 client_id, const String& text, const String& title, const Gfx::ShareableBitmap&);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user