diff --git a/EDMarketConnector.py b/EDMarketConnector.py index a0474e6e..28663e43 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -873,7 +873,7 @@ if __name__ == "__main__": GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW GetProcessHandleFromHwnd = ctypes.windll.oleacc.GetProcessHandleFromHwnd SetForegroundWindow = ctypes.windll.user32.SetForegroundWindow - ShowWindow = ctypes.windll.user32.ShowWindow + ShowWindowAsync = ctypes.windll.user32.ShowWindowAsync def WindowTitle(h): if h: @@ -888,7 +888,7 @@ if __name__ == "__main__": cls = ctypes.create_unicode_buffer(257) if GetClassName(hWnd, cls, 257) and cls.value == 'TkTopLevel' and WindowTitle(hWnd) == applongname and GetProcessHandleFromHwnd(hWnd): # If GetProcessHandleFromHwnd succeeds then the app is already running as this user - ShowWindow(hWnd, 9) # SW_RESTORE + ShowWindowAsync(hWnd, 9) # SW_RESTORE SetForegroundWindow(hWnd) sys.exit(0) return True diff --git a/monitor.py b/monitor.py index 438daf8c..21510dd7 100644 --- a/monitor.py +++ b/monitor.py @@ -196,8 +196,6 @@ class EDLogs(FileSystemEventHandler): self.stop() if self.observer: self.observer.stop() - if thread: - thread.join() if self.observer: self.observer.join() self.observer = None