diff mbox series

[v10,5/6] ui/cocoa: Call console_select() with the BQL

Message ID 20240214-cocoa-v10-5-c7ffe5d9f08a@daynix.com
State New
Headers show
Series ui/cocoa: Use NSWindow's ability to resize | expand

Commit Message

Akihiko Odaki Feb. 14, 2024, 4:32 a.m. UTC
console_select() can be called anytime so explicitly take the BQL.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 ui/cocoa.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ui/cocoa.m b/ui/cocoa.m
index a1f54b3ebb9a..aeec3c48859c 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1390,7 +1390,9 @@  - (void)zoomToFit:(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 */