mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-09 16:42:10 +02:00
Sometimes, pumping the event loop will cause new events to be generated. For example, an IPC message could be delivered which then dispatches a new event to be handled by the GUI. To the invoker of `EventLoop::pump()`, it is not obvious if any events were processed at all. Libraries like SDL2 might not have the opportunity to run the event loop often enough that events can be processed swiftly, since it might spend time doing other things. This can result in stuttering GUI interactions. This changes `EventLoop::pump()` to return the number of processed events. This functionality will be used by our SDL2 port in another PR.
3.0 KiB
3.0 KiB