do not always grab on startup
This commit is contained in:
parent
b5850abeed
commit
d4a4605d6b
@ -194,12 +194,15 @@ class driver(inputDriver):
|
||||
self.updateMPiDevicesFD()
|
||||
|
||||
def updateMPiDevicesFD(self):
|
||||
for fd in self.iDevices:
|
||||
if not fd in self.iDevicesFD:
|
||||
self.iDevicesFD.append(fd)
|
||||
for fd in self.iDevicesFD:
|
||||
if not fd in self.iDevices:
|
||||
self.iDevicesFD.remove(fd)
|
||||
try:
|
||||
for fd in self.iDevices:
|
||||
if not fd in self.iDevicesFD:
|
||||
self.iDevicesFD.append(fd)
|
||||
for fd in self.iDevicesFD:
|
||||
if not fd in self.iDevices:
|
||||
self.iDevicesFD.remove(fd)
|
||||
except:
|
||||
pass
|
||||
def mapEvent(self, event):
|
||||
if not self._initialized:
|
||||
return None
|
||||
@ -276,8 +279,9 @@ class driver(inputDriver):
|
||||
return
|
||||
def addDevice(self, newDevice):
|
||||
self.iDevices[newDevice.fd] = newDevice
|
||||
self.gDevices[newDevice.fd] = False
|
||||
self.createUInputDev(newDevice.fd)
|
||||
self.grabDevice(newDevice.fd)
|
||||
#self.grabDevice(newDevice.fd)
|
||||
def grabDevice(self, fd):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'):
|
||||
return
|
||||
@ -340,6 +344,5 @@ class driver(inputDriver):
|
||||
self.removeDevice(fd)
|
||||
self.iDevices.clear()
|
||||
self.uDevices.clear()
|
||||
self.gDevices.clear()
|
||||
self.iDeviceNo = 0
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user