From 3315ad85a29eee53ac2c7b8b9845f148ff99edaf Mon Sep 17 00:00:00 2001 From: culler Date: Tue, 19 May 2020 20:43:44 +0000 Subject: Aqua: Try processing idle events before each call to [NSApp nextEventMatchingMask ...] --- macosx/tkMacOSXNotify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 96c9a7a..985d7bc 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -338,6 +338,7 @@ TkMacOSXEventsSetupProc( * Call this with dequeue=NO -- just checking if the queue is empty. */ + while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {} NSEvent *currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] @@ -407,6 +408,7 @@ TkMacOSXEventsCheckProc( [NSApp _lockAutoreleasePool]; do { + while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {} modalSession = TkMacOSXGetModalSession(); testEvent = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] @@ -420,6 +422,7 @@ TkMacOSXEventsCheckProc( if (testEvent && [[testEvent window] inLiveResize]) { break; } + while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {} currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:GetRunLoopMode(modalSession) -- cgit v0.12