Cocoa: user performSelectorOnMainThread instead of postEvent for the tick callback

performSelectorOnMainThread runs in more loop run modes which means that
the tick callback will behave more like it does on other platforms,
during window resizes and other modal event loops.
This commit is contained in:
Kovid Goyal
2019-03-21 15:51:10 +05:30
parent 48303bac75
commit 0dc6ac26c3
4 changed files with 10 additions and 8 deletions

View File

@@ -939,8 +939,8 @@ void
wakeup_main_loop() {
request_tick_callback();
#ifndef __APPLE__
// On Cocoa request_tick_callback() uses an event which wakes up the
// main loop anyway
// On Cocoa request_tick_callback() uses performSelectorOnMainLoop which
// wakes up the main loop anyway
glfwPostEmptyEvent();
#endif
}