[PULL 11/12] ui/cocoa: Call console_select() with the BQL

Philippe Mathieu-Daudé posted 12 patches 8 months, 3 weeks ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Akihiko Odaki <akihiko.odaki@daynix.com>
[PULL 11/12] ui/cocoa: Call console_select() with the BQL
Posted by Philippe Mathieu-Daudé 8 months, 3 weeks ago
From: Akihiko Odaki <akihiko.odaki@daynix.com>

[-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 | 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 @@ - (void)toggleZoomInterpolation:(id) sender
 /* Displays the console on the screen */
 - (void)displayConsole:(id)sender
 {
-    console_select([sender tag]);
+    with_bql(^{
+        console_select([sender tag]);
+    });
 }
 
 /* Pause the guest */
-- 
2.41.0