qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ui/cocoa: Fix poweroff request code


From: Gerd Hoffmann
Subject: Re: [PATCH] ui/cocoa: Fix poweroff request code
Date: Thu, 9 Jun 2022 11:27:19 +0200

On Sun, May 29, 2022 at 12:45:06PM +0200, Philippe Mathieu-Daudé wrote:
> On 29/5/22 10:25, Akihiko Odaki wrote:
> > Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> > ---
> >   ui/cocoa.m | 6 +++++-
> >   1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/ui/cocoa.m b/ui/cocoa.m
> > index 09a62817f2a..84c84e98fc5 100644
> > --- a/ui/cocoa.m
> > +++ b/ui/cocoa.m
> > @@ -35,6 +35,7 @@
> >   #include "ui/kbd-state.h"
> >   #include "sysemu/sysemu.h"
> >   #include "sysemu/runstate.h"
> > +#include "sysemu/runstate-action.h"
> >   #include "sysemu/cpu-throttle.h"
> >   #include "qapi/error.h"
> >   #include "qapi/qapi-commands-block.h"
> > @@ -1290,7 +1291,10 @@ - (void)applicationWillTerminate:(NSNotification 
> > *)aNotification
> >   {
> >       COCOA_DEBUG("QemuCocoaAppController: applicationWillTerminate\n");
> > -    qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
> > +    with_iothread_lock(^{
> > +        shutdown_action = SHUTDOWN_ACTION_POWEROFF;
> > +        qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
> > +    });
> >       /*
> >        * Sleep here, because returning will cause OSX to kill us
> 
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Added to queue.

thanks,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]