diff --git a/hotkey.py b/hotkey.py index 5165e0b9..af2d9533 100644 --- a/hotkey.py +++ b/hotkey.py @@ -128,7 +128,7 @@ if platform == 'darwin': self.acquire_state = HotkeyMgr.ACQUIRE_INACTIVE def _acquire_poll(self): - if config.shutting_down: + if config.shutting_down(): return # No way of signalling to Tkinter from within the monkey-patched event handler that doesn't @@ -350,8 +350,9 @@ elif platform == 'win32': config.get_int('hotkey_always') or WindowTitle(GetForegroundWindow()).startswith('Elite - Dangerous') ): - logger.debug('Sending event <>') - self.root.event_generate('<>', when="tail") + if not config.shutting_down: + logger.debug('Sending event <>') + self.root.event_generate('<>', when="tail") else: logger.debug('Passing key on')