All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	xen-devel@lists.xenproject.org,
	"Akihiko Odaki" <akihiko.odaki@gmail.com>,
	"Hongren (Zenithal) Zheng" <i@zenithal.me>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Canokeys.org" <contact@canokeys.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Paul Durrant" <paul@xen.org>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PULL 03/16] ui/cocoa: Fix poweroff request code
Date: Mon, 13 Jun 2022 13:36:42 +0200	[thread overview]
Message-ID: <20220613113655.3693872-4-kraxel@redhat.com> (raw)
In-Reply-To: <20220613113655.3693872-1-kraxel@redhat.com>

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



  parent reply	other threads:[~2022-06-13 11:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 11:36 [PULL 00/16] Kraxel 20220613 patches Gerd Hoffmann
2022-06-13 11:36 ` [PULL 01/16] ui/gtk-gl-area: implement GL context destruction Gerd Hoffmann
2022-06-13 11:36 ` [PULL 02/16] ui/gtk-gl-area: create the requested GL context version Gerd Hoffmann
2022-06-13 11:36 ` Gerd Hoffmann [this message]
2022-06-13 11:36 ` [PULL 04/16] hw/usb: Add CanoKey Implementation Gerd Hoffmann
2022-06-13 11:36 ` [PULL 05/16] hw/usb/canokey: Add trace events Gerd Hoffmann
2022-06-13 11:36 ` [PULL 06/16] meson: Add CanoKey Gerd Hoffmann
2022-06-13 11:36 ` [PULL 07/16] docs: Add CanoKey documentation Gerd Hoffmann
2022-06-13 11:36 ` [PULL 08/16] docs/system/devices/usb: Add CanoKey to USB devices examples Gerd Hoffmann
2022-06-13 11:36 ` [PULL 09/16] MAINTAINERS: add myself as CanoKey maintainer Gerd Hoffmann
2022-06-13 11:36 ` [PULL 10/16] hw/usb/hcd-ehci: fix writeback order Gerd Hoffmann
2022-06-13 11:36 ` [PULL 11/16] usbredir: avoid queuing hello packet on snapshot restore Gerd Hoffmann
2022-06-13 11:36 ` [PULL 12/16] virtio-gpu: update done only on the scanout associated with rect Gerd Hoffmann
2022-06-13 11:36 ` [PULL 13/16] ui/console: Do not return a value with ui_info Gerd Hoffmann
2022-06-13 11:36 ` [PULL 14/16] ui: Deliver refresh rate via QemuUIInfo Gerd Hoffmann
2022-06-13 11:36 ` [PULL 15/16] virtio-gpu: Respect UI refresh rate for EDID Gerd Hoffmann
2022-06-13 11:36 ` [PULL 16/16] ui: move 'pc-bios/keymaps' to 'ui/keymaps' Gerd Hoffmann
2022-06-13 15:52 ` [PULL 00/16] Kraxel 20220613 patches Richard Henderson
2022-06-13 15:54   ` Richard Henderson
2022-06-14  9:40   ` Gerd Hoffmann
2022-06-14  9:51     ` Daniel P. Berrangé
2022-06-14 12:14       ` Gerd Hoffmann
2022-06-14 12:16   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220613113655.3693872-4-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=akihiko.odaki@gmail.com \
    --cc=alex.williamson@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=contact@canokeys.org \
    --cc=f4bug@amsat.org \
    --cc=i@zenithal.me \
    --cc=mst@redhat.com \
    --cc=paul@xen.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.