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
Tkinter (IDLE) submenu on Wayland stays open if you switch windows #130045
The sub menu does not close automatically and when I switch windows with it open it stays on top of whatever window I've opened. The screenshot below shows the behavior.
Occurs in both 3.13 and main branch. Running Fedora 41 GNOME
Everything between 'behavior.' and 'Occurs in' is the included image. I don't see anything like this on Windows or macOS. The menu goes away when focus goes away, so is gone when returning focus to IDLE. So I am marking this as tkinter on Linux issue.
I tried reproducing this on Debian 13 ("Trixie") with the XFCE desktop environment running in X11. It defaults to a click-to-focus mode. The Python version is the system-packaged Python 3.13.5 with tcl/tk 8.6.16.
I opened the File menu, then clicked on another application. The File menu disappeared and was no longer visible, and the other application was brought to the front.
When the menu is shown, hotkeys such as alt+tab are not acted on by the window manager and no change occurs.
In "focus follows mouse" mode, the pop-up menu inhibits shifts in focus as long as it is displayed. A click outside the menu area (including on another application window) dismisses it without moving focus.
It could simply be a gnome bug? I recommend creating a simple reproducer (in wish, even) and raising it as a bug with Gnome. Even if they don't consider it to be a bug, they might have some insight into whether an application can avoid or modify the behavior.
changed the title [-]IDLE submenu stays open if you switch windows[/-][+]Tkinter (IDLE) submenu on Wayland stays open if you switch windows[/+]on May 23, 2026
Activity
terryjreedy commentedon Feb 12, 2025
Everything between 'behavior.' and 'Occurs in' is the included image. I don't see anything like this on Windows or macOS. The menu goes away when focus goes away, so is gone when returning focus to IDLE. So I am marking this as tkinter on Linux issue.
jepler commentedon May 19, 2026
I tried reproducing this on Debian 13 ("Trixie") with the XFCE desktop environment running in X11. It defaults to a click-to-focus mode. The Python version is the system-packaged Python 3.13.5 with tcl/tk 8.6.16.
I opened the File menu, then clicked on another application. The File menu disappeared and was no longer visible, and the other application was brought to the front.
When the menu is shown, hotkeys such as alt+tab are not acted on by the window manager and no change occurs.
In "focus follows mouse" mode, the pop-up menu inhibits shifts in focus as long as it is displayed. A click outside the menu area (including on another application window) dismisses it without moving focus.
It could simply be a gnome bug? I recommend creating a simple reproducer (in wish, even) and raising it as a bug with Gnome. Even if they don't consider it to be a bug, they might have some insight into whether an application can avoid or modify the behavior.
terryjreedy commentedon May 22, 2026
@serhiy-storchaka Could this be a tk bug specific to a subset of linuxes?
StanFromIreland commentedon May 23, 2026
Based on the discussion on the Discord, it may be an issue specific to the display server (Wayland).
serhiy-storchaka commentedon May 23, 2026
I confirm this on Ubuntu 26.04 KDE Wayland. I cannot reproduce this on X11. Years ago I observed similar bugs on X11. I think this is a Tk bug.
[-]IDLE submenu stays open if you switch windows[/-][+]Tkinter (IDLE) submenu on Wayland stays open if you switch windows[/+]