summaryrefslogtreecommitdiffstats
path: root/src/VBox/Frontends/VirtualBox/src/main.cpp
diff options
context:
space:
mode:
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,