[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/15] ui/cocoa: Fix poweroff request code
From: |
Gerd Hoffmann |
Subject: |
[PULL 03/15] ui/cocoa: Fix poweroff request code |
Date: |
Tue, 14 Jun 2022 14:15:58 +0200 |
From: Akihiko Odaki <akihiko.odaki@gmail.com>
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>
---
ui/cocoa.m | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 09a62817f2a9..84c84e98fc5e 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
--
2.36.1
- [PULL 00/15] Kraxel 20220614 patches, Gerd Hoffmann, 2022/06/14
- [PULL 01/15] ui/gtk-gl-area: implement GL context destruction, Gerd Hoffmann, 2022/06/14
- [PULL 04/15] hw/usb: Add CanoKey Implementation, Gerd Hoffmann, 2022/06/14
- [PULL 12/15] virtio-gpu: update done only on the scanout associated with rect, Gerd Hoffmann, 2022/06/14
- [PULL 06/15] meson: Add CanoKey, Gerd Hoffmann, 2022/06/14
- [PULL 09/15] MAINTAINERS: add myself as CanoKey maintainer, Gerd Hoffmann, 2022/06/14
- [PULL 13/15] ui/console: Do not return a value with ui_info, Gerd Hoffmann, 2022/06/14
- [PULL 15/15] virtio-gpu: Respect UI refresh rate for EDID, Gerd Hoffmann, 2022/06/14
- [PULL 07/15] docs: Add CanoKey documentation, Gerd Hoffmann, 2022/06/14
- [PULL 05/15] hw/usb/canokey: Add trace events, Gerd Hoffmann, 2022/06/14
- [PULL 03/15] ui/cocoa: Fix poweroff request code,
Gerd Hoffmann <=
- [PULL 10/15] hw/usb/hcd-ehci: fix writeback order, Gerd Hoffmann, 2022/06/14
- [PULL 11/15] usbredir: avoid queuing hello packet on snapshot restore, Gerd Hoffmann, 2022/06/14
- [PULL 02/15] ui/gtk-gl-area: create the requested GL context version, Gerd Hoffmann, 2022/06/14
- [PULL 08/15] docs/system/devices/usb: Add CanoKey to USB devices examples, Gerd Hoffmann, 2022/06/14
- [PULL 14/15] ui: Deliver refresh rate via QemuUIInfo, Gerd Hoffmann, 2022/06/14
- Re: [PULL 00/15] Kraxel 20220614 patches, Richard Henderson, 2022/06/14