mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibGUI+Notification: Add notification closing
Closing a notification will now allow it to be shown again, as m_showing being false means it can be re-shown.
This commit is contained in:
parent
ef4144c183
commit
0fd1e6f062
5 changed files with 24 additions and 1 deletions
|
@ -60,4 +60,13 @@ OwnPtr<Messages::NotificationServer::ShowNotificationResponse> ClientConnection:
|
|||
return make<Messages::NotificationServer::ShowNotificationResponse>();
|
||||
}
|
||||
|
||||
OwnPtr<Messages::NotificationServer::CloseNotificationResponse> ClientConnection::handle([[maybe_unused]] const Messages::NotificationServer::CloseNotification& message)
|
||||
{
|
||||
auto window = NotificationWindow::get_window_by_id(client_id());
|
||||
if (window) {
|
||||
window->close();
|
||||
}
|
||||
return make<Messages::NotificationServer::CloseNotificationResponse>();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue