diff mbox series

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

Message ID 20240217-cocoa-v11-5-0a17a7e534d4@daynix.com (mailing list archive)
State New, archived
Headers show
Series ui/cocoa: Use NSWindow's ability to resize | expand

Commit Message

Akihiko Odaki Feb. 17, 2024, 11:18 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(-)

Comments

Peter Maydell Feb. 22, 2024, 4:51 p.m. UTC | #1
On Sat, 17 Feb 2024 at 11:19, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> console_select() can be called anytime so explicitly take the BQL.

I think you mean "displayConsole" here ?

>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
>  ui/cocoa.m | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 17f290987563..81de8d92669b 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -1391,7 +1391,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 */

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox series

Patch

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 17f290987563..81de8d92669b 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1391,7 +1391,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 */