Skip to content

Add Window menu for macOS and specify Help menu to AppKit #12357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

sebastianlivoni
Copy link

@sebastianlivoni sebastianlivoni commented Aug 4, 2025

This PR adds proper integration of the Window and Help menus on macOS to align with standard macOS application behavior.

A native Window menu is now added to the application menu on macOS with Minimize, Zoom, Window Tiling buttons, and Bring All to Front menus automatically inserted by AppKit.

The Help menu now integrates with AppKit installing a Spotlight search item automatically.

Fixes #7028

Screenshots

The new Window menu item with most items added automatically by AppKit:
image

A spotlight search item are automatically added by AppKit:
image

Type of change

  • ✅ New feature (change that adds functionality)

@Copilot Copilot AI review requested due to automatic review settings August 4, 2025 17:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds proper macOS menu integration by implementing native Window and Help menu support through AppKit. The changes enable standard macOS application behavior with a native Window menu containing system-provided items like Minimize, Zoom, and window management functions, while also integrating the Help menu with AppKit to provide Spotlight search functionality.

  • Adds a new configureWindowAndHelpMenus method to handle macOS-specific menu integration
  • Creates a native Window menu with standard macOS window management items
  • Integrates the Help menu with AppKit for Spotlight search support

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/gui/osutils/macutils/MacUtils.h Declares the new configureWindowAndHelpMenus method
src/gui/osutils/macutils/MacUtils.cpp Implements the trampoline method to call AppKit implementation
src/gui/osutils/macutils/AppKitImpl.mm Contains the core implementation for creating and configuring native menus
src/gui/osutils/macutils/AppKitImpl.h Declares the Objective-C method for menu configuration
src/gui/osutils/macutils/AppKit.h Adds the C++ interface method and required includes
src/gui/MainWindow.cpp Calls the menu configuration during main window initialization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow fullscreening on macOS with ^⌘F
2 participants