From 4b49f92ce1499eecf5be5365429e5d4c486354db Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sat, 24 Feb 2024 21:43:40 +0900 Subject: [PATCH] ui/cocoa: Call console_select() with the BQL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [-QemuCocoaView displayConsole:] can be called anytime so explicitly take the BQL before it calls console_select(). Signed-off-by: Akihiko Odaki Tested-by: Rene Engel Reviewed-by: Peter Maydell Message-ID: <20240224-cocoa-v12-9-e89f70bdda71@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 6c9efa0c20..bc63043158 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1379,7 +1379,9 @@ static CGEventRef handleTapEvent(CGEventTapProxy proxy, CGEventType type, CGEven /* Displays the console on the screen */ - (void)displayConsole:(id)sender { - console_select([sender tag]); + with_bql(^{ + console_select([sender tag]); + }); } /* Pause the guest */