On Mon, Feb 25, 2019 at 5:24 AM Peter Maydell <peter.mayd...@linaro.org> wrote:
> The OSX Mojave release is more picky about enforcing the Cocoa API > restriction that only the main thread may perform UI calls. To > accommodate this we need to restructure the Cocoa code: > * the special OSX main() creates a second thread and uses > that to call the vl.c qemu_main(); the original main > thread goes into the OSX event loop > * the refresh, switch and update callbacks asynchronously > tell the main thread to do the necessary work > * the refresh callback no longer does the "get events from the > UI event queue and handle them" loop, since we now use > the stock OSX event loop. Instead our NSApplication sendEvent > method will either deal with them or pass them on to OSX > > All these things have to be changed in one commit, to avoid > breaking bisection. > > Note that since we use dispatch_get_main_queue(), this bumps > our minimum version requirement to OSX 10.10 Yosemite (released > in 2014, unsupported by Apple since 2017). > > I think eliminating support for Macintosh operating systems older than 10.10 is a mistake. These operating systems may be old but are far from useless. They are fully capable of handling QEMU. I do believe that fixing support for Mac OS 10.14 and maintaining support for older versions of Mac OS is possible. Calling methods and functions on the main thread can be done using performSelectorOnMainThread. Thank you.