From 8bed7ce8e2142ab152f3bb3bba36b611839a9431 Mon Sep 17 00:00:00 2001 From: Chrys Date: Fri, 18 Oct 2019 00:24:20 +0200 Subject: [PATCH] more fixes --- src/fenrirscreenreader/core/fenrirManager.py | 7 ++++--- src/fenrirscreenreader/core/inputManager.py | 3 +-- src/fenrirscreenreader/core/remoteManager.py | 8 +++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index 55fcce36..df67921a 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -98,7 +98,7 @@ class fenrirManager(): self.environment['runtime']['commandManager'].executeDefaultTrigger('onByteInput') def handleExecuteCommand(self, event): if not event['Data']: - return + return if event['Data'] == '': return command = event['Data'] @@ -233,13 +233,14 @@ class fenrirManager(): self.shutdownRequest() def shutdown(self): + self.environment['runtime']['inputManager'].ungrabAllDevices() self.environment['runtime']['eventManager'].stopMainEventLoop() - self.environment['runtime']['outputManager'].presentText(_("Quit Fenrir"), soundIcon='ScreenReaderOff', interrupt=True) + self.environment['runtime']['outputManager'].presentText(_("Quit Fenrir"), soundIcon='ScreenReaderOff', interrupt=True) self.environment['runtime']['eventManager'].cleanEventQueue() time.sleep(0.6) for currManager in self.environment['general']['managerList']: if self.environment['runtime'][currManager]: - self.environment['runtime'][currManager].shutdown() + self.environment['runtime'][currManager].shutdown() del self.environment['runtime'][currManager] self.environment = None diff --git a/src/fenrirscreenreader/core/inputManager.py b/src/fenrirscreenreader/core/inputManager.py index bbded492..e2b4cc90 100644 --- a/src/fenrirscreenreader/core/inputManager.py +++ b/src/fenrirscreenreader/core/inputManager.py @@ -62,7 +62,7 @@ class inputManager(): print(self.env['runtime']['screenManager'].getCurrScreenIgnored()) if self.env['runtime']['screenManager'].getCurrScreenIgnored(): while not self.ungrabAllDevices(): - time.sleep(0.1) + time.sleep(0.2) self.env['runtime']['debug'].writeDebugOut("retry ungrabAllDevices " ,debug.debugLevel.WARNING) print('try ungrabbing') self.env['runtime']['debug'].writeDebugOut("All devices ungrabbed" ,debug.debugLevel.INFO) @@ -74,7 +74,6 @@ class inputManager(): print('try grabbing') print('grabbed') self.env['runtime']['debug'].writeDebugOut("All devices grabbed" ,debug.debugLevel.INFO) - self.executeDeviceGrab = False def sendKeys(self, keyMacro): for e in keyMacro: diff --git a/src/fenrirscreenreader/core/remoteManager.py b/src/fenrirscreenreader/core/remoteManager.py index 4a2b7a2a..86e19c8c 100644 --- a/src/fenrirscreenreader/core/remoteManager.py +++ b/src/fenrirscreenreader/core/remoteManager.py @@ -39,7 +39,7 @@ class remoteManager(): self.resetVmenuConst = 'RESETVMENU' self.interruptConst = 'INTERRUPT' self.quitAppConst = 'QUITAPPLICATION' - self.tempDisableSpeechConst = 'TEMPDISABLESPEECH' + self.tempDisableSpeechConst = 'TEMPDISABLESPEECH' self.defineWindowConst = 'WINDOW ' self.resetWindowConst = 'RESETWINDOW' self.setClipboardConst = 'CLIPBOARD ' @@ -47,7 +47,7 @@ class remoteManager(): self.settingConst = 'SETTING ' self.setSettingConst = 'SET ' self.saveAsSettingConst = 'SAVEAS ' - self.saveSettingConst = 'SAVE' + self.saveSettingConst = 'SAVE' self.resetSettingConst = 'RESET' def initialize(self, environment): self.env = environment @@ -158,15 +158,13 @@ class remoteManager(): self.env['runtime']['settingsManager'].resetSettingArgDict() def setSettings(self, settingsArgs): self.env['runtime']['settingsManager'].parseSettingArgs(settingsArgs) - self.env['runtime']['screenManager'].getCurrScreen() - self.env['runtime']['screenManager'].getSessionInformation() self.env['runtime']['screenManager'].updateScreenIgnored() def handleRemoteIncomming(self, eventData): if not eventData: return upperEventData = eventData.upper() self.env['runtime']['debug'].writeDebugOut('remoteManager:handleRemoteIncomming: event: ' + str(eventData),debug.debugLevel.INFO) - + if upperEventData.startswith(self.settingConst): settingsText = eventData[len(self.settingConst):] self.handleSettingsChange(settingsText)