Skip to content

Commit

Permalink
Possible fix for hiding Windows terminal. Ref #3290
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Feb 12, 2024
1 parent f831d71 commit 3c8cff2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gns3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ def exceptionHook(exception, value, tb):
# hide the console
# win32console.AllocConsole()
console_window = win32console.GetConsoleWindow()
if console_window:
parent_window = win32gui.GetParent(console_window)
if not parent_window and console_window:
win32gui.ShowWindow(console_window, win32con.SW_HIDE)
elif parent_window:
win32gui.ShowWindow(parent_window, win32con.SW_HIDE)
else:
log.warning("Could not get the console window")
except win32console.error as e:
Expand Down

0 comments on commit 3c8cff2

Please sign in to comment.