On 17/3/22 12:57, Paolo Bonzini wrote:
Just one change to aid future reading of the code, possibly. Move this
line:
On 3/16/22 17:03, Philippe Mathieu-Daudé wrote:
+ qemu_event_init(&cbevent, false);
just before
+ cbowner = [[QemuCocoaPasteboardTypeOwner alloc] init];
i.e. the place where it was before the patch, in cocoa_display_init.
OK. I'll also include this change
(s/cocoa_display_init/applicationDidFinishLaunching):
@@ -611,17 +611,17 @@
- (void) updateUIInfo
{
if (!allow_events) {
/*
* Don't try to tell QEMU about UI information in the application
* startup phase -- we haven't yet registered dcl with the QEMU UI
* layer, and also trying to take the iothread lock would
deadlock.
- * When cocoa_display_init() does register the dcl, the UI layer
- * will call cocoa_switch(), which will call updateUIInfo, so
- * we don't lose any information here.
+ * When applicationDidFinishLaunching() does register the dcl, the
+ * UI layer will call cocoa_switch(), which will call updateUIInfo,
+ * so we don't lose any information here.
*/
return;
}