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:
Rummskartoffel 2023-11-04 16:02:02 +01:00 committed by Andreas Kling
parent 438e9e146c
commit a281fa3902

View file

@ -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)
{