add force

This commit is contained in:
Chrys 2019-10-21 23:36:46 +02:00
parent d01d4f0773
commit 42a690de77
3 changed files with 7 additions and 6 deletions

View File

@ -127,7 +127,7 @@ class fenrirManager():
self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange')
self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \
self.environment['runtime']['applicationManager'].getPrevApplication(), \
self.environment['runtime']['applicationManager'].getCurrentApplication())
self.environment['runtime']['applicationManager'].getCurrentApplication())
'''
if self.environment['runtime']['vmenuManager'].getActive():
return

View File

@ -49,7 +49,9 @@ class inputManager():
return event
def setExecuteDeviceGrab(self, newExecuteDeviceGrab = True):
self.executeDeviceGrab = newExecuteDeviceGrab
def handleDeviceGrab(self):
def handleDeviceGrab(self, force = False):
if force:
self.setExecuteDeviceGrab()
if not self.executeDeviceGrab:
print('1')
return
@ -175,10 +177,9 @@ class inputManager():
self.env['runtime']['inputDriver'].updateInputDevices(newDevice)
except:
pass
self.setExecuteDeviceGrab()
try:
if self.env['runtime']['screenManager']:
self.handleDeviceGrab()
self.handleDeviceGrab(force = True)
except:
pass
def removeAllDevices(self):

View File

@ -417,10 +417,10 @@ class settingsManager():
environment['runtime']['vmenuManager'].initialize(environment)
environment['runtime']['quickMenuManager'] = quickMenuManager.quickMenuManager()
environment['runtime']['quickMenuManager'].initialize(environment)
# only possible after having input and screen managers with clean buffer
environment['runtime']['inputManager'].setExecuteDeviceGrab()
environment['runtime']['inputManager'].writeEventBuffer()
environment['runtime']['inputManager'].handleDeviceGrab()
environment['runtime']['inputManager'].handleDeviceGrab(force = True)
environment['runtime']['debug'].writeDebugOut('\/-------environment-------\/',debug.debugLevel.INFO, onAnyLevel=True)
environment['runtime']['debug'].writeDebugOut(str(environment), debug.debugLevel.INFO, onAnyLevel=True)