mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-09 03:42:16 +03:00
hotkey: Avoid event_generate() calls during shutdown
# Conflicts: # hotkey.py
This commit is contained in:
parent
608a336bb3
commit
b39cc7974e
@ -128,7 +128,7 @@ if platform == 'darwin':
|
|||||||
self.acquire_state = HotkeyMgr.ACQUIRE_INACTIVE
|
self.acquire_state = HotkeyMgr.ACQUIRE_INACTIVE
|
||||||
|
|
||||||
def _acquire_poll(self):
|
def _acquire_poll(self):
|
||||||
if config.shutting_down:
|
if config.shutting_down():
|
||||||
return
|
return
|
||||||
|
|
||||||
# No way of signalling to Tkinter from within the monkey-patched event handler that doesn't
|
# No way of signalling to Tkinter from within the monkey-patched event handler that doesn't
|
||||||
@ -350,6 +350,7 @@ elif platform == 'win32':
|
|||||||
config.get_int('hotkey_always')
|
config.get_int('hotkey_always')
|
||||||
or WindowTitle(GetForegroundWindow()).startswith('Elite - Dangerous')
|
or WindowTitle(GetForegroundWindow()).startswith('Elite - Dangerous')
|
||||||
):
|
):
|
||||||
|
if not config.shutting_down:
|
||||||
logger.debug('Sending event <<Invoke>>')
|
logger.debug('Sending event <<Invoke>>')
|
||||||
self.root.event_generate('<<Invoke>>', when="tail")
|
self.root.event_generate('<<Invoke>>', when="tail")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user