summaryrefslogtreecommitdiffstats
path: root/src/VBox/Frontends/VirtualBox/src/main.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:52 +0000
commitcd47c2446f1a9dee96610f298989848f8986a8be (patch)
tree02c30d62a9164987d0aaba2f72c58a50053205d6 /src/VBox/Frontends/VirtualBox/src/main.cpp
parentReleasing progress-linux version 7.0.14-dfsg-4~progress7.99u1. (diff)
downloadvirtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.tar.xz
virtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.zip
Merging upstream version 7.0.16-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Frontends/VirtualBox/src/main.cpp')
-rw-r--r--src/VBox/Frontends/VirtualBox/src/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/VBox/Frontends/VirtualBox/src/main.cpp b/src/VBox/Frontends/VirtualBox/src/main.cpp
index 02b1de55..dd6c6b64 100644
--- a/src/VBox/Frontends/VirtualBox/src/main.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/main.cpp
@@ -423,8 +423,13 @@ extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char ** /*envp*/)
#endif /* VBOX_WITH_HARDENING */
#ifdef VBOX_WS_MAC
+ /* Prevent AppNap for Runtime UI only: */
+ bool fPreventAppNap = false;
+# ifdef VBOX_RUNTIME_UI
+ fPreventAppNap = true;
+# endif
/* Instantiate own NSApplication before QApplication do it for us: */
- UICocoaApplication::instance();
+ UICocoaApplication::create(fPreventAppNap);
# ifdef VBOX_RUNTIME_UI
/* If we're a helper app inside Resources in the main application bundle,