Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

[macOS] Application-level hide/show (NSApp hide/unhide)

Ouverte
#59 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
52/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
cpp, macos, objective-c
Domaine
api, desktop

Piste de recherche

Start with src/platform/macos/window_macos.mm and the existing Window::Hide() behavior, then trace the Application API entry point. Check the macOS hide-twice and global-shortcut cases described in the issue; done means Application::Hide(), Show(), and IsHidden() expose the requested NSApp behavior without breaking window reopening or shortcut handling.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement

On macOS, Window::Hide() uses orderOut: (src/platform/macos/window_macos.mm). That's right for hiding one window, but the application stays "shown" as far as the system is concerned. The Dock menu keeps offering "Hide", clicking the Dock icon doesn't bring the window back, and the previously active app doesn't get focus back.

Apps that live in the tray or menu bar usually want app-level hiding. Proposal: add Application::Hide() / Application::Show() (and IsHidden()), backed by [NSApp hide:] / [NSApp unhide:] on macOS. Also check the hide-twice case on macOS 14+, and hiding while a global shortcut handler is running.

Background, from window_manager (moving onto nativeapi in 0.6.0):

  • leanflutter/window_manager#431: the Dock menu doesn't understand hide()
  • leanflutter/window_manager#530: a PR that switched hide() to NSApp.hide(nil)
  • possibly related: leanflutter/window_manager#501 (window can't be reopened after hiding twice on macOS 14+), #543 (crash on hide() with hotkey_manager)
Langage dominant
C++
Étoiles
34
Forks
7
Merge moyen
3 j 1 h
PR mergées (30 j)
1

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de libnativeapi/nativeapi

Toutes les issues de libnativeapi/nativeapi

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.