File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -319,19 +319,9 @@ static enum ui_msg_window_response ui_msg_window_cocoa_warning(ui_msg_window_sta
319319
320320static void ui_application_cocoa_process_events (void )
321321{
322- for (;;)
323- {
324- NSEvent *event = [NSApp nextEventMatchingMask: NSEventMaskAny untilDate: [NSDate distantPast ] inMode: NSDefaultRunLoopMode dequeue: YES ];
325- if (!event)
326- break ;
327- #ifndef HAVE_COCOA_METAL
328- [event retain ];
329- #endif
330- [NSApp sendEvent: event];
331- #ifndef HAVE_COCOA_METAL
332- [event retain ];
333- #endif
334- }
322+ /* Intentionally empty. The CFRunLoopObserver (kCFRunLoopBeforeWaiting)
323+ * fires after the run loop has already processed pending events, so
324+ * manual event polling here is unnecessary and just adds overhead. */
335325}
336326
337327static ui_application_t ui_application_cocoa = {
You can’t perform that action at this time.
0 commit comments