From ae612ce9f2415f4df9de82e65a79c59f6b620130 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 13 May 2018 23:42:04 +0200 Subject: [PATCH] grab/ungrab on noKeyPressed() --- src/fenrirscreenreader/core/screenManager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/core/screenManager.py b/src/fenrirscreenreader/core/screenManager.py index b58e0b98..e24a5978 100644 --- a/src/fenrirscreenreader/core/screenManager.py +++ b/src/fenrirscreenreader/core/screenManager.py @@ -47,11 +47,13 @@ class screenManager(): if self.toggleDeviceGrab: if self.env['runtime']['inputManager'].noKeyPressed(): if self.getCurrScreenIgnored(): + print('ungrab') self.env['runtime']['inputManager'].ungrabAllDevices() self.env['runtime']['outputManager'].interruptOutput() else: self.env['runtime']['inputManager'].grabAllDevices() - self.toggleDeviceGrab = True + print('grab') + self.toggleDeviceGrab = False def handleScreenUpdate(self, eventData): self.env['screen']['oldApplication'] = self.env['screen']['newApplication']