diff options
Diffstat (limited to 'opentrack/main-window.cpp')
-rw-r--r-- | opentrack/main-window.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp index f449845b..20506d81 100644 --- a/opentrack/main-window.cpp +++ b/opentrack/main-window.cpp @@ -32,6 +32,12 @@ #include <QDir> #include <QDateTime> + +#ifdef __APPLE__ +void disable_appnap_start(); +void disable_appnap_stop(); +#endif + extern "C" const char* const opentrack_version; using namespace options::globals; @@ -436,6 +442,11 @@ void main_window::start_tracker_() if (work) return; +#ifdef __APPLE__ + disable_appnap_start(); +#endif + + #ifndef UI_NO_VIDEO_FEED auto* frame = ui.video_frame; #else @@ -486,6 +497,10 @@ void main_window::stop_tracker_() if (!work) return; +#ifdef __APPLE__ + disable_appnap_stop(); +#endif + force_is_visible(true); with_tracker_teardown sentinel; |