Skip to content

Make menu bar visible whatever dialog has focus#1864

Merged
windymilla merged 1 commit into
DistributedProofreaders:masterfrom
windymilla:dialog-menus
May 25, 2026
Merged

Make menu bar visible whatever dialog has focus#1864
windymilla merged 1 commit into
DistributedProofreaders:masterfrom
windymilla:dialog-menus

Conversation

@windymilla
Copy link
Copy Markdown
Collaborator

@windymilla windymilla commented May 25, 2026

Tk9 on Macs only displays the root menu bar when the root window has focus, not if a dialog has focus.
Assign the root menu bar to all dialogs.

Testing: Check if it breaks Tk8 version on Macs. If it does, we'll need if is_mac() and is_tk9() but I'd rather avoid explicit Tk9 testing where possible.

Tk9 on Macs only displays the root menu bar when the
root window has focus, not if a dialog has focus.
Assign the root menu bar to all dialogs.

Testing: Check if it breaks Tk8 version on Macs
@windymilla windymilla requested review from srjfoo and tangledhelix May 25, 2026 10:33
Copy link
Copy Markdown
Member

@tangledhelix tangledhelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with Python 3.13.5 / Tk 8 and Python 3.14.5 / Tk 9. Menus stay consistent as I open S/R, Bookloupe, WF, Regex Library, etc. Looks good.

Copy link
Copy Markdown
Member

@srjfoo srjfoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, also!

@windymilla windymilla merged commit a553948 into DistributedProofreaders:master May 25, 2026
1 check passed
@windymilla windymilla deleted the dialog-menus branch May 25, 2026 18:33
windymilla added a commit that referenced this pull request May 28, 2026
On Macs, the fix causes problems with Tk 8.6. It's only needed
for Tk 9+, so just do it when needed.
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.

3 participants