We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0905367 commit 2910abdCopy full SHA for 2910abd
ui/cocoa.m
@@ -35,6 +35,7 @@
35
#include "ui/kbd-state.h"
36
#include "sysemu/sysemu.h"
37
#include "sysemu/runstate.h"
38
+#include "sysemu/runstate-action.h"
39
#include "sysemu/cpu-throttle.h"
40
#include "qapi/error.h"
41
#include "qapi/qapi-commands-block.h"
@@ -1290,7 +1291,10 @@ - (void)applicationWillTerminate:(NSNotification *)aNotification
1290
1291
{
1292
COCOA_DEBUG("QemuCocoaAppController: applicationWillTerminate\n");
1293
- qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
1294
+ with_iothread_lock(^{
1295
+ shutdown_action = SHUTDOWN_ACTION_POWEROFF;
1296
+ qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
1297
+ });
1298
1299
/*
1300
* Sleep here, because returning will cause OSX to kill us
0 commit comments