detect device only once
This commit is contained in:
@ -83,9 +83,9 @@ class fenrirManager():
|
||||
else:
|
||||
self.environment['runtime']['inputManager'].writeEventBuffer()
|
||||
if self.environment['runtime']['inputManager'].noKeyPressed():
|
||||
self.environment['runtime']['inputManager'].handleDeviceGrab()
|
||||
self.modifierInput = False
|
||||
self.singleKeyCommand = False
|
||||
self.environment['runtime']['inputManager'].handleDeviceGrab()
|
||||
if self.environment['input']['keyForeward'] > 0:
|
||||
self.environment['input']['keyForeward'] -=1
|
||||
self.environment['runtime']['commandManager'].executeDefaultTrigger('onKeyInput')
|
||||
@ -201,11 +201,6 @@ class fenrirManager():
|
||||
self.command = ''
|
||||
def setProcessName(self, name = 'fenrir'):
|
||||
"""Attempts to set the process name to 'fenrir'."""
|
||||
|
||||
#sys.argv[0] = name
|
||||
|
||||
# Disabling the import error of setproctitle.
|
||||
# pylint: disable-msg=F0401
|
||||
try:
|
||||
from setproctitle import setproctitle
|
||||
except ImportError:
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.core import inputData
|
||||
import os, inspect, time
|
||||
import os, inspect, time, traceback
|
||||
currentdir = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
|
||||
fenrirPath = os.path.dirname(currentdir)
|
||||
|
||||
@ -61,14 +61,14 @@ class inputManager():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].getCurrScreenIgnored():
|
||||
while not self.ungrabAllDevices():
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.25)
|
||||
self.env['runtime']['debug'].writeDebugOut("retry ungrabAllDevices " ,debug.debugLevel.WARNING)
|
||||
print('try ungrabbing')
|
||||
self.env['runtime']['debug'].writeDebugOut("All devices ungrabbed" ,debug.debugLevel.INFO)
|
||||
print('ungrabbed')
|
||||
else:
|
||||
while not self.grabAllDevices():
|
||||
time.sleep(0.2)
|
||||
time.sleep(0.25)
|
||||
self.env['runtime']['debug'].writeDebugOut("retry grabAllDevices" ,debug.debugLevel.WARNING)
|
||||
print('try grabbing')
|
||||
print('grabbed')
|
||||
|
Reference in New Issue
Block a user