@@ -453,32 +453,6 @@ def _initializeObjectCaches():
453453 api .setMouseObject (desktopObject )
454454
455455
456- class _TrackNVDAInitialization :
457- """
458- During NVDA initialization,
459- core._initializeObjectCaches needs to cache the desktop object,
460- regardless of lock state.
461- Security checks may cause the desktop object to not be set if NVDA starts on the lock screen.
462- As such, during initialization, NVDA should behave as if Windows is unlocked,
463- i.e. winAPI.sessionTracking._isLockScreenModeActive should return False.
464-
465- TODO: move to NVDAState module
466- """
467-
468- _isNVDAInitialized = False
469- """When False, _isLockScreenModeActive is forced to return False.
470- """
471-
472- @staticmethod
473- def markInitializationComplete ():
474- assert not _TrackNVDAInitialization ._isNVDAInitialized
475- _TrackNVDAInitialization ._isNVDAInitialized = True
476-
477- @staticmethod
478- def isInitializationComplete () -> bool :
479- return _TrackNVDAInitialization ._isNVDAInitialized
480-
481-
482456def _doLoseFocus ():
483457 import api
484458 focusObject = api .getFocusObject ()
@@ -765,7 +739,7 @@ def run(self):
765739 from winAPI import sessionTracking
766740 sessionTracking .initialize ()
767741
768- _TrackNVDAInitialization .markInitializationComplete ()
742+ NVDAState . _TrackNVDAInitialization .markInitializationComplete ()
769743
770744 log .info ("NVDA initialized" )
771745
0 commit comments