You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS "Hide" handled improperly in tkinter with Tk >= 9.0 #161848
Using the macOS OS-level "Hide" feature misbehaves. Rather than hiding the window(s) as expected, tkinter apps are pushed to the background and lose focus to another app. This only seems to happen with Tk >= 9.0; using an older Tk 8.6-based tkinter doesn't have this bug.
This is easy to reproduce. Run the below. It's easiest to test if there's not much clutter on the screen; a simple test case is a terminal to run Python in and clear other apps from the desktop.
importtkinterastk; r=tk.Tk(); r.mainloop()
After the tkinter window pops up, try to hide (using "Hide" in the menu or Cmd-H). The tkinter app will defocus but remain on-screen, focus will shift to another app (probably the terminal).
Activity