ui/cocoa: Call console_select() with the BQL
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sat, 24 Feb 2024 12:43:40 +0000 (21:43 +0900)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 5 Mar 2024 11:04:41 +0000 (12:04 +0100)
[-QemuCocoaView displayConsole:] can be called anytime so explicitly
take the BQL before it calls console_select().

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Rene Engel <ReneEngel80@emailn.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240224-cocoa-v12-9-e89f70bdda71@daynix.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
ui/cocoa.m

index 6c9efa0c202921498f36c35c9a55ff3de7d1de21..bc630431587af40208c89f28ff8247d1340bd49c 100644 (file)
@@ -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 */