1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

WebContent: Coalesce multiple sequential MouseMove events

This can avoid getting into a situation where lots of MouseMove events
are queued up and they all trigger relayout (or something else that
takes a lot of time).

To make sure that we don't get out of sync with the input events queue
on the UI process side, we still send acknowledgements for coalesced
MouseMoves. There's room for improvement here.

My Discord friends list is now pleasantly responsive. :^)
This commit is contained in:
Andreas Kling 2023-03-14 13:47:40 +01:00
parent f8c075f2b1
commit a58d84407f
2 changed files with 24 additions and 8 deletions

View file

@ -136,6 +136,7 @@ private:
unsigned modifiers {};
int wheel_delta_x {};
int wheel_delta_y {};
size_t coalesced_event_count { 0 };
};
struct QueuedKeyboardEvent {