diff --git a/src/fenrir-package/inputDriver/evdev.py b/src/fenrir-package/inputDriver/evdev.py index feff6ff8..6817e37a 100644 --- a/src/fenrir-package/inputDriver/evdev.py +++ b/src/fenrir-package/inputDriver/evdev.py @@ -57,8 +57,8 @@ class driver(): # 1 Keys # we try to filter out mices and other stuff here self.iDevices = map(evdev.InputDevice, (evdev.list_devices())) - #self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()} - self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities()} + self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()} + #self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities()} self.ledDevices = map(evdev.InputDevice, (evdev.list_devices())) self.ledDevices = {dev.fd: dev for dev in self.ledDevices if 1 in dev.capabilities() and 17 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()} diff --git a/src/fenrir-package/screenDriver/linux.py b/src/fenrir-package/screenDriver/linux.py index 3f941b29..3e8062dd 100644 --- a/src/fenrir-package/screenDriver/linux.py +++ b/src/fenrir-package/screenDriver/linux.py @@ -128,9 +128,17 @@ class driver(): self.env['screenData']['oldCursor']['y'] == self.env['screenData']['newCursor']['y'] and \ self.env['screenData']['newContentText'][:self.env['screenData']['newCursor']['y']] == self.env['screenData']['oldContentText'][:self.env['screenData']['newCursor']['y']]: diffStart = self.env['screenData']['newCursor']['y'] * self.env['screenData']['columns'] + self.env['screenData']['newCursor']['y'] - diff = difflib.ndiff(self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']],\ - self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']]) + oldScreenText = self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']] + oldScreenText = ' '.join(oldScreenText.split()) + newScreenText = self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']] + newScreenText = ' '.join(newScreenText.split()) + diff = difflib.ndiff(oldScreenText, newScreenText) else: + oldScreenText = self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']] + oldScreenText = ' '.join(oldScreenText.split()) + newScreenText = self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']] + newScreenText = ' '.join(newScreenText.split()) + diff = difflib.ndiff(oldScreenText, newScreenText) diff = difflib.ndiff( oldScreenText[0:].split('\n'),\ newScreenText[0:].split('\n'))