gh-66331: Set correct WM_CLASS on X11 for IDLE windows#152733
Merged
Conversation
Set the WM_CLASS of IDLE's long-lived windows (window-list windows and the stack viewers) to "Idle" instead of the default "Toplevel", so that window managers group and label them correctly.
|
Thanks @serhiy-storchaka for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-152794 is a backport of this pull request to the 3.15 branch. |
|
GH-152795 is a backport of this pull request to the 3.14 branch. |
|
GH-152796 is a backport of this pull request to the 3.13 branch. |
terryjreedy
pushed a commit
that referenced
this pull request
Jul 1, 2026
) (#152796) gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) Set the WM_CLASS of IDLE's long-lived windows (window-list windows and the stack viewers) to "Idle" instead of the default "Toplevel", so that window managers group and label them correctly. (cherry picked from commit 4e16b8d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
terryjreedy
pushed a commit
that referenced
this pull request
Jul 1, 2026
) (#152795) gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) Set the WM_CLASS of IDLE's long-lived windows (window-list windows and the stack viewers) to "Idle" instead of the default "Toplevel", so that window managers group and label them correctly. (cherry picked from commit 4e16b8d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
terryjreedy
pushed a commit
that referenced
this pull request
Jul 1, 2026
) (#152794) gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) Set the WM_CLASS of IDLE's long-lived windows (window-list windows and the stack viewers) to "Idle" instead of the default "Toplevel", so that window managers group and label them correctly. (cherry picked from commit 4e16b8d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The root window is created with
Tk(className="Idle"), but IDLE's toplevel windows kept the defaultToplevelWM_CLASS, so X11 window managers (GNOME Shell, KDE) group and label them incorrectly.Set
class_='Idle'on IDLE's long-lived, independently-listed windows so their WM_CLASS matches the root:ListedToplevel(editor, shell, output, class/module/path browsers, debugger);Transient dialogs (Find/Replace, config, About, …) and override-redirect popups (autocomplete, calltip, tooltip) are left unchanged: the former are grouped with their parent via
WM_TRANSIENT_FOR, the latter are not listed by the window manager.🤖 Generated with Claude Code