mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 18:07:37 +03:00
Unregister hotkey on app exit on Windows.
Hopefully fixes issues #68 and #69.
This commit is contained in:
parent
47d757ffbb
commit
b9257cead3
@ -481,6 +481,7 @@ class AppWindow:
|
|||||||
self.w.clipboard_append(self.station['text'] == self.STATION_UNDOCKED and self.system['text'] or '%s,%s' % (self.system['text'], self.station['text']))
|
self.w.clipboard_append(self.station['text'] == self.STATION_UNDOCKED and self.system['text'] or '%s,%s' % (self.system['text'], self.station['text']))
|
||||||
|
|
||||||
def onexit(self, event=None):
|
def onexit(self, event=None):
|
||||||
|
hotkeymgr.unregister()
|
||||||
flightlog.close()
|
flightlog.close()
|
||||||
if platform!='darwin' or self.w.winfo_rooty()>0: # http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
|
if platform!='darwin' or self.w.winfo_rooty()>0: # http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
|
||||||
config.set('geometry', '+{1}+{2}'.format(*self.w.geometry().split('+')))
|
config.set('geometry', '+{1}+{2}'.format(*self.w.geometry().split('+')))
|
||||||
|
@ -278,6 +278,7 @@ elif platform == 'win32':
|
|||||||
def unregister(self):
|
def unregister(self):
|
||||||
if self.thread:
|
if self.thread:
|
||||||
PostThreadMessage(self.thread.ident, WM_QUIT, 0, 0)
|
PostThreadMessage(self.thread.ident, WM_QUIT, 0, 0)
|
||||||
|
self.thread.join() # Wait for it to unregister hotkey and quit
|
||||||
self.thread = None
|
self.thread = None
|
||||||
|
|
||||||
def worker(self, keycode, modifiers):
|
def worker(self, keycode, modifiers):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user