mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
NotificationServer: Reposition notifications on screen resolution change
Previously notifications were (partially) drawn outside the screen rect if they were created before changing the screen resolution to smaller dimensions. This prevented the user from dismissing the notification as the close button was no longer clickable.
This commit is contained in:
parent
2caf4e66ea
commit
fc2c5c373b
3 changed files with 7 additions and 1 deletions
|
@ -25,8 +25,10 @@
|
|||
*/
|
||||
|
||||
#include "ClientConnection.h"
|
||||
#include "NotificationWindow.h"
|
||||
#include <LibCore/LocalServer.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Desktop.h>
|
||||
#include <LibGUI/WindowServerConnection.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
@ -66,5 +68,7 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
GUI::Desktop::the().on_rect_change = [](auto&) { NotificationServer::update_notification_window_locations(); };
|
||||
|
||||
return app->exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue