From d084a11145d14740ad04068ca0d6a7fdb2cf95ea Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 4 Oct 2019 18:05:33 +0200 Subject: [PATCH] Update evdevDriver.py --- src/fenrirscreenreader/inputDriver/evdevDriver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index 27f65999..d07907fc 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -284,14 +284,16 @@ class driver(inputDriver): return True ok = True for fd in self.iDevices: - ok = ok and self.grabDevice(fd) + if not self.gDevices[fd]: + ok = ok and self.grabDevice(fd) return ok def ungrabAllDevices(self): if not self._initialized: return True ok = True for fd in self.iDevices: - ok = ok and self.ungrabDevice(fd) + if self.gDevices[fd]: + ok = ok and self.ungrabDevice(fd) return ok def createUInputDev(self, fd): if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'):