Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#59 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, macos, objective-c
Ambito
api, desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
Lingua principale
C++
Stelle
34
Fork
7
Merge medio
3g 1h
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di libnativeapi/nativeapi

Tutte le issue di libnativeapi/nativeapi

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.