1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-21 11:27:38 +03:00

hotkey: Avoid event_generate() calls during shutdown

# Conflicts:
#	hotkey.py
This commit is contained in:
Athanasius 2021-03-22 14:16:12 +00:00
parent 608a336bb3
commit b39cc7974e

@ -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 <<Invoke>>')
self.root.event_generate('<<Invoke>>', when="tail")
if not config.shutting_down:
logger.debug('Sending event <<Invoke>>')
self.root.event_generate('<<Invoke>>', when="tail")
else:
logger.debug('Passing key on')