Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-22 Thread Roman Bolshakov
On Thu, Feb 14, 2019 at 10:28:16AM +, Peter Maydell 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

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-15 Thread BALATON Zoltan
On Fri, 15 Feb 2019, Peter Maydell wrote: On Fri, 15 Feb 2019 at 01:28, BALATON Zoltan wrote: On Thu, 14 Feb 2019, Peter Maydell wrote: - (void)sendEvent:(NSEvent *)event { COCOA_DEBUG("QemuApplication: sendEvent\n"); -[super sendEvent: event]; +if (!cocoaView || ![cocoaView handl

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-15 Thread Peter Maydell
On Fri, 15 Feb 2019 at 01:28, BALATON Zoltan wrote: > > On Thu, 14 Feb 2019, Peter Maydell wrote: > > - (void)sendEvent:(NSEvent *)event > > { > > COCOA_DEBUG("QemuApplication: sendEvent\n"); > > -[super sendEvent: event]; > > +if (!cocoaView || ![cocoaView handleEvent:event]) { > > +

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-14 Thread BALATON Zoltan
On Thu, 14 Feb 2019, Peter Maydell 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 c

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-14 Thread BALATON Zoltan
On Thu, 14 Feb 2019, Peter Maydell 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 c

[Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-14 Thread Peter Maydell
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 mai