diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index a118a493..4b78b6f6 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -127,7 +127,7 @@ class fenrirManager(): self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange') self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \ self.environment['runtime']['applicationManager'].getPrevApplication(), \ - self.environment['runtime']['applicationManager'].getCurrentApplication()) + self.environment['runtime']['applicationManager'].getCurrentApplication()) ''' if self.environment['runtime']['vmenuManager'].getActive(): return diff --git a/src/fenrirscreenreader/core/inputManager.py b/src/fenrirscreenreader/core/inputManager.py index eb379607..58733dac 100644 --- a/src/fenrirscreenreader/core/inputManager.py +++ b/src/fenrirscreenreader/core/inputManager.py @@ -49,7 +49,9 @@ class inputManager(): return event def setExecuteDeviceGrab(self, newExecuteDeviceGrab = True): self.executeDeviceGrab = newExecuteDeviceGrab - def handleDeviceGrab(self): + def handleDeviceGrab(self, force = False): + if force: + self.setExecuteDeviceGrab() if not self.executeDeviceGrab: print('1') return @@ -175,10 +177,9 @@ class inputManager(): self.env['runtime']['inputDriver'].updateInputDevices(newDevice) except: pass - self.setExecuteDeviceGrab() try: if self.env['runtime']['screenManager']: - self.handleDeviceGrab() + self.handleDeviceGrab(force = True) except: pass def removeAllDevices(self): diff --git a/src/fenrirscreenreader/core/settingsManager.py b/src/fenrirscreenreader/core/settingsManager.py index 48238ccc..1d9da482 100644 --- a/src/fenrirscreenreader/core/settingsManager.py +++ b/src/fenrirscreenreader/core/settingsManager.py @@ -417,10 +417,10 @@ class settingsManager(): environment['runtime']['vmenuManager'].initialize(environment) environment['runtime']['quickMenuManager'] = quickMenuManager.quickMenuManager() environment['runtime']['quickMenuManager'].initialize(environment) + # only possible after having input and screen managers with clean buffer - environment['runtime']['inputManager'].setExecuteDeviceGrab() environment['runtime']['inputManager'].writeEventBuffer() - environment['runtime']['inputManager'].handleDeviceGrab() + environment['runtime']['inputManager'].handleDeviceGrab(force = True) environment['runtime']['debug'].writeDebugOut('\/-------environment-------\/',debug.debugLevel.INFO, onAnyLevel=True) environment['runtime']['debug'].writeDebugOut(str(environment), debug.debugLevel.INFO, onAnyLevel=True)