5588840ff7
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). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Tested-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-id: 20190225102433.22401-8-peter.maydell@linaro.org Message-id: 20190214102816.3393-8-peter.maydell@linaro.org |
||
---|---|---|
.. | ||
icons | ||
keycodemapdb@6b3d716e2b | ||
shader | ||
cocoa.m | ||
console-gl.c | ||
console.c | ||
curses_keys.h | ||
curses.c | ||
cursor_hidden.xpm | ||
cursor_left_ptr.xpm | ||
cursor.c | ||
egl-context.c | ||
egl-headless.c | ||
egl-helpers.c | ||
gtk-egl.c | ||
gtk-gl-area.c | ||
gtk.c | ||
input-keymap.c | ||
input-legacy.c | ||
input-linux.c | ||
input.c | ||
kbd-state.c | ||
keymaps.c | ||
keymaps.h | ||
Makefile.objs | ||
qemu-pixman.c | ||
qemu-x509.h | ||
qemu.desktop | ||
sdl2-2d.c | ||
sdl2-gl.c | ||
sdl2-input.c | ||
sdl2.c | ||
shader.c | ||
spice-app.c | ||
spice-core.c | ||
spice-display.c | ||
spice-input.c | ||
trace-events | ||
vgafont.h | ||
vnc_keysym.h | ||
vnc-auth-sasl.c | ||
vnc-auth-sasl.h | ||
vnc-auth-vencrypt.c | ||
vnc-auth-vencrypt.h | ||
vnc-enc-hextile-template.h | ||
vnc-enc-hextile.c | ||
vnc-enc-tight.c | ||
vnc-enc-tight.h | ||
vnc-enc-zlib.c | ||
vnc-enc-zrle.c | ||
vnc-enc-zrle.h | ||
vnc-enc-zrle.inc.c | ||
vnc-enc-zywrle-template.c | ||
vnc-enc-zywrle.h | ||
vnc-jobs.c | ||
vnc-jobs.h | ||
vnc-palette.c | ||
vnc-palette.h | ||
vnc-stubs.c | ||
vnc-ws.c | ||
vnc-ws.h | ||
vnc.c | ||
vnc.h | ||
x_keymap.c | ||
x_keymap.h |