mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-09 18:16:09 +03:00
NotificationServer: Don't shuffle notifications on first hover
Before this patch, hovering with the mouse over one of at least two newly created notifications would cause all notifications to be reordered on the screen, when previously they appeared in order of creation, growing downwards. This happened because the position of all notifications is updated when any of them is hovered, in case the hovered notification was resized. By using an ordered HashMap instead, creation order is preserved.
This commit is contained in:
parent
438e9e146c
commit
a281fa3902
Notes:
sideshowbarker
2024-07-17 21:11:12 +09:00
Author: https://github.com/Rummskartoffel Commit: https://github.com/SerenityOS/serenity/commit/a281fa3902 Pull-request: https://github.com/SerenityOS/serenity/pull/21754 Reviewed-by: https://github.com/awesomekling
@ -18,7 +18,7 @@
|
||||
|
||||
namespace NotificationServer {
|
||||
|
||||
static HashMap<u32, RefPtr<NotificationWindow>> s_windows;
|
||||
static OrderedHashMap<u32, RefPtr<NotificationWindow>> s_windows;
|
||||
|
||||
static void update_notification_window_locations(Gfx::IntRect const& screen_rect)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user