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:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:46 +0000
commit96647a898d62d699808316238dfb933d960413f2 (patch)
tree0138491ada40b7b3fcb80d4b219fa7922ae8f512 /src/VBox/Frontends/VirtualBox/src/main.cpp
parentAdding debian version 7.0.14-dfsg-4. (diff)
downloadvirtualbox-96647a898d62d699808316238dfb933d960413f2.tar.xz
virtualbox-96647a898d62d699808316238dfb933d960413f2.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,