Skip to content

Commit 4c69e36

Browse files
committed
FIX: macosx only flush events already in the queue
1 parent 9921e39 commit 4c69e36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_macosx.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,11 @@ static CGFloat _get_device_scale(CGContextRef cr)
395395
// to process, breaking out of the loop when no events remain and
396396
// displaying the canvas if needed.
397397
NSEvent *event;
398+
// Only process events that were already in the queue
399+
NSDate *date = [NSDate now];
398400
while (true) {
399401
event = [NSApp nextEventMatchingMask: NSEventMaskAny
400-
untilDate: [NSDate distantPast]
402+
untilDate: date
401403
inMode: NSDefaultRunLoopMode
402404
dequeue: YES];
403405
if (!event) {

0 commit comments

Comments
 (0)