This is the display's main event loop. Any accumulated event messages are dispatched to the event-driven callbacks of the corresponding window for processing.