From 8b2639945619bcf5c8f55e55587853b6a291f370 Mon Sep 17 00:00:00 2001 From: Jonathan Schoreels Date: Tue, 9 Dec 2025 12:29:38 +0100 Subject: [PATCH] Use macos_helper.disable_appnap at startup --- qt/aqt/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index c707d1b2a..1c40b32b4 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -48,6 +48,7 @@ from anki.utils import ( split_fields, ) from aqt import gui_hooks +from aqt._macos_helper import macos_helper from aqt.addons import DownloadLogEntry, check_and_prompt_for_updates, show_log_to_user from aqt.dbcheck import check_db from aqt.debug_console import show_debug_console @@ -1718,6 +1719,9 @@ title="{}" {}>{}""".format( self.hideMenuAccels = True self.maybeHideAccelerators() self.hideStatusTips() + # prevent App Nap from suspending Anki in the background + if macos_helper: + macos_helper.disable_appnap() elif is_win: self._setupWin32()