Skip to content

gh-66331: Set correct WM_CLASS on X11 for IDLE windows#152733

Merged
terryjreedy merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-66331-idle-wm-class
Jul 1, 2026
Merged

gh-66331: Set correct WM_CLASS on X11 for IDLE windows#152733
terryjreedy merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-66331-idle-wm-class

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 1, 2026

Copy link
Copy Markdown
Member

The root window is created with Tk(className="Idle"), but IDLE's toplevel windows kept the default Toplevel WM_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:

  • window-list windows, via ListedToplevel (editor, shell, output, class/module/path browsers, debugger);
  • the local and remote stack viewers.

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

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.
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 1, 2026
@terryjreedy terryjreedy merged commit 4e16b8d into python:main Jul 1, 2026
59 checks passed
@miss-islington-app

Copy link
Copy Markdown

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.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 1, 2026

Copy link
Copy Markdown

GH-152794 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 1, 2026
@bedevere-app

bedevere-app Bot commented Jul 1, 2026

Copy link
Copy Markdown

GH-152795 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 1, 2026
@bedevere-app

bedevere-app Bot commented Jul 1, 2026

Copy link
Copy Markdown

GH-152796 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 1, 2026
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>
@serhiy-storchaka serhiy-storchaka deleted the gh-66331-idle-wm-class branch July 1, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants