grab/ungrab on noKeyPressed()

This commit is contained in:
chrys 2018-05-13 23:42:04 +02:00
parent abc449bec2
commit ae612ce9f2

View File

@ -47,11 +47,13 @@ class screenManager():
if self.toggleDeviceGrab: if self.toggleDeviceGrab:
if self.env['runtime']['inputManager'].noKeyPressed(): if self.env['runtime']['inputManager'].noKeyPressed():
if self.getCurrScreenIgnored(): if self.getCurrScreenIgnored():
print('ungrab')
self.env['runtime']['inputManager'].ungrabAllDevices() self.env['runtime']['inputManager'].ungrabAllDevices()
self.env['runtime']['outputManager'].interruptOutput() self.env['runtime']['outputManager'].interruptOutput()
else: else:
self.env['runtime']['inputManager'].grabAllDevices() self.env['runtime']['inputManager'].grabAllDevices()
self.toggleDeviceGrab = True print('grab')
self.toggleDeviceGrab = False
def handleScreenUpdate(self, eventData): def handleScreenUpdate(self, eventData):
self.env['screen']['oldApplication'] = self.env['screen']['newApplication'] self.env['screen']['oldApplication'] = self.env['screen']['newApplication']