mirror of
https://github.com/qemu/qemu.git
synced 2025-08-16 23:02:44 +00:00
ui/cocoa: Fix poweroff request code
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220529082508.89097-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
09053670c9
commit
2910abd6b4
@ -35,6 +35,7 @@
|
|||||||
#include "ui/kbd-state.h"
|
#include "ui/kbd-state.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "sysemu/runstate.h"
|
#include "sysemu/runstate.h"
|
||||||
|
#include "sysemu/runstate-action.h"
|
||||||
#include "sysemu/cpu-throttle.h"
|
#include "sysemu/cpu-throttle.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qapi/qapi-commands-block.h"
|
#include "qapi/qapi-commands-block.h"
|
||||||
@ -1290,7 +1291,10 @@ - (void)applicationWillTerminate:(NSNotification *)aNotification
|
|||||||
{
|
{
|
||||||
COCOA_DEBUG("QemuCocoaAppController: applicationWillTerminate\n");
|
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
|
* Sleep here, because returning will cause OSX to kill us
|
||||||
|
Loading…
Reference in New Issue
Block a user