mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Forgot to apply sendEvent micro-optimization to a couple more places
This commit is contained in:
@@ -1791,7 +1791,7 @@ void _glfwPlatformPollEvents(void)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny
|
NSEvent* event = [NSApp nextEventMatchingMask:NSEventMaskAny
|
||||||
untilDate:nil
|
untilDate:[NSDate distantPast]
|
||||||
inMode:NSDefaultRunLoopMode
|
inMode:NSDefaultRunLoopMode
|
||||||
dequeue:YES];
|
dequeue:YES];
|
||||||
if (event == nil)
|
if (event == nil)
|
||||||
@@ -1813,7 +1813,7 @@ void _glfwPlatformWaitEvents(void)
|
|||||||
untilDate:[NSDate distantFuture]
|
untilDate:[NSDate distantFuture]
|
||||||
inMode:NSDefaultRunLoopMode
|
inMode:NSDefaultRunLoopMode
|
||||||
dequeue:YES];
|
dequeue:YES];
|
||||||
[NSApp sendEvent:event];
|
if ([event type] != NSEventTypeApplicationDefined) [NSApp sendEvent:event];
|
||||||
|
|
||||||
_glfwPlatformPollEvents();
|
_glfwPlatformPollEvents();
|
||||||
}
|
}
|
||||||
@@ -1825,8 +1825,7 @@ void _glfwPlatformWaitEventsTimeout(double timeout)
|
|||||||
untilDate:date
|
untilDate:date
|
||||||
inMode:NSDefaultRunLoopMode
|
inMode:NSDefaultRunLoopMode
|
||||||
dequeue:YES];
|
dequeue:YES];
|
||||||
if (event)
|
if (event && [event type] != NSEventTypeApplicationDefined) [NSApp sendEvent:event];
|
||||||
[NSApp sendEvent:event];
|
|
||||||
|
|
||||||
_glfwPlatformPollEvents();
|
_glfwPlatformPollEvents();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user