Skip to content

gh-159517: Do not use ::tk::unsupported::MacWindowStyle in IDLE on Tk 9.1 - #159527

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-159517-idle-macwindowstyle
Oct 17, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-159517-idle-macwindowstyle

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Tk 9.1 no longer provides ::tk::unsupported::MacWindowStyle. The calls in IDLE were wrapped in try/except TclError, so they are now silently ignored, and the completion list and the call tip can grab the focus on macOS again.

Use wm attributes -stylemask docmodal instead, as Tk itself does for its balloon window in library/systray.tcl.

Not tested on macOS.

… on Tk 9.1

Tk 9.1 no longer provides this command.  Use "wm attributes -stylemask
docmodal" instead, as Tk itself does for its balloon window.  The calls
were silently ignored, so the completion list and the call tip could
grab the focus on macOS.
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@serhiy-storchaka
serhiy-storchaka deleted the gh-159517-idle-macwindowstyle branch October 17, 2026 13:36
@bedevere-app

bedevere-app Bot commented Oct 17, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 17, 2026
@bedevere-app

bedevere-app Bot commented Oct 17, 2026

Copy link
Copy Markdown

GH-159625 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 Oct 17, 2026
serhiy-storchaka added a commit that referenced this pull request Oct 17, 2026
…E on Tk 9.1 (GH-159527) (GH-159625)

Tk 9.1 no longer provides this command.  Use "wm attributes -stylemask
docmodal" instead, as Tk itself does for its balloon window.  The calls
were silently ignored, so the completion list and the call tip could
grab the focus on macOS.
(cherry picked from commit e5ef47e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Oct 17, 2026
…E on Tk 9.1 (GH-159527) (GH-159624)

Tk 9.1 no longer provides this command.  Use "wm attributes -stylemask
docmodal" instead, as Tk itself does for its balloon window.  The calls
were silently ignored, so the completion list and the call tip could
grab the focus on macOS.
(cherry picked from commit e5ef47e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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.

1 participant