Exemple #1
0
 def _close(self):            
     try:
         Qz.CGEventTapEnable(self._tap, False)
     except Exception:
         pass
     try:
         if Qz.CFRunLoopContainsSource(self._device_loop,self._loop_source,self._loop_mode) is True:    
             Qz.CFRunLoopRemoveSource(self._device_loop,self._loop_source,self._loop_mode)
     finally:
         self._loop_source=None
         self._tap=None
         self._device_loop=None
         self._loop_mode=None            
     ioHubKeyboardDevice._close(self)
Exemple #2
0
 def _close(self):
     try:
         self._nativeSetSystemCursorVisibility(True)
     except Exception:
         pass
     
     try:
         Qz.CGEventTapEnable(self._tap, False)
     except Exception:
         pass
     
     try:
         if Qz.CFRunLoopContainsSource(self._device_loop,self._loop_source,self._loop_mode) is True:    
             Qz.CFRunLoopRemoveSource(self._device_loop,self._loop_source,self._loop_mode)
     finally:
         self._loop_source=None
         self._tap=None
         self._device_loop=None
         self._loop_mode=None
     
     MouseDevice._close(self)