From a281fa39025524d375f5e88037e5de4fd0607130 Mon Sep 17 00:00:00 2001 From: Rummskartoffel Date: Sat, 4 Nov 2023 16:02:02 +0100 Subject: [PATCH] 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. --- Userland/Services/NotificationServer/NotificationWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Services/NotificationServer/NotificationWindow.cpp b/Userland/Services/NotificationServer/NotificationWindow.cpp index 38f2f09fe6..6373e33a34 100644 --- a/Userland/Services/NotificationServer/NotificationWindow.cpp +++ b/Userland/Services/NotificationServer/NotificationWindow.cpp @@ -18,7 +18,7 @@ namespace NotificationServer { -static HashMap> s_windows; +static OrderedHashMap> s_windows; static void update_notification_window_locations(Gfx::IntRect const& screen_rect) {