[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 7/7] ui/cocoa: Perform UI operations only on
From: |
G 3 |
Subject: |
Re: [Qemu-devel] [PATCH v3 7/7] ui/cocoa: Perform UI operations only on the main thread |
Date: |
Thu, 28 Feb 2019 17:35:54 -0500 |
On Mon, Feb 25, 2019 at 5:24 AM Peter Maydell <address@hidden>
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.
- [Qemu-devel] [PATCH v3 0/7] ui/cocoa: Use OSX's main loop, Peter Maydell, 2019/02/25
- [Qemu-devel] [PATCH v3 3/7] ui/cocoa: Factor out initial menu creation, Peter Maydell, 2019/02/25
- [Qemu-devel] [PATCH v3 1/7] ui/cocoa: Ensure we have the iothread lock when calling into QEMU, Peter Maydell, 2019/02/25
- [Qemu-devel] [PATCH v3 2/7] ui/cocoa: Use the pixman image directly in switchSurface, Peter Maydell, 2019/02/25
- [Qemu-devel] [PATCH v3 4/7] ui/cocoa: Move console/device menu creation code up in file, Peter Maydell, 2019/02/25
- [Qemu-devel] [PATCH v3 7/7] ui/cocoa: Perform UI operations only on the main thread, Peter Maydell, 2019/02/25
- Re: [Qemu-devel] [PATCH v3 7/7] ui/cocoa: Perform UI operations only on the main thread,
G 3 <=
- [Qemu-devel] [PATCH v3 6/7] ui/cocoa: Subclass NSApplication so we can implement sendEvent, Peter Maydell, 2019/02/25
- [Qemu-devel] [PATCH v3 5/7] ui/cocoa: Don't call NSApp sendEvent directly from handleEvent, Peter Maydell, 2019/02/25
- Re: [Qemu-devel] [PATCH v3 0/7] ui/cocoa: Use OSX's main loop, Peter Maydell, 2019/02/25