summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2020-05-19 20:43:44 (GMT)
committerculler <culler>2020-05-19 20:43:44 (GMT)
commit3315ad85a29eee53ac2c7b8b9845f148ff99edaf (patch)
tree3b52194d881735fc54555abed9a9624d188e0c7e /macosx
parent5204a77ccd7306b8ed7c3c264c88171f68180efd (diff)
downloadtk-3315ad85a29eee53ac2c7b8b9845f148ff99edaf.zip
tk-3315ad85a29eee53ac2c7b8b9845f148ff99edaf.tar.gz
tk-3315ad85a29eee53ac2c7b8b9845f148ff99edaf.tar.bz2
Aqua: Try processing idle events before each call to [NSApp nextEventMatchingMask ...]
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXNotify.c3
1 files changed, 3 insertions, 0 deletions
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)