-
Jan-Marek Glogowski yazdı
For some (unknown) reason [NSApp postEvent: ... atStart: NO] doesn't append the event, if the message queue is empty (AKA [NSApp nextEventMatchingMask .. ] returns nil). Due to nextEventMatchingMask usage, these postEvents have to run in the main thread. Using performSelectorOnMainThread deadlocks, since the calling thread may have locked the Yield mutex, so we simply defer the call using an NSEvent, like the Windows backend. So we have to peek at the queue and if it's empty simply prepend the event using [.. atStart: YES]. In the end this make the vcl_timer unit test pass on OSX. Change-Id: Ib41186425b2f76faa0e9f116f47fdcd60d878099
272026d7