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

Cancellable window close request (and app quit request) event

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Start by tracing the platform close paths named in the issue: WM_QUERYENDSESSION/WM_ENDSESSION, WM_CLOSE, macOS Cmd+Q, GTK delete-event, and Window::Close(). Review the linked window_manager reports, especially the AppLifecycleListener.onExitRequested compatibility concern. Done means defining and implementing a cross-platform cancellable window-close event and application-level quit request without swallowing system shutdown or breaking Flutter lifecycle handling.

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

Descrizione

enhancement

There's no way to intercept a window being closed. Only WindowClosedEvent fires after the fact. window_manager 0.6.0 currently can't implement setPreventClose / onWindowClose for the system close button, and documents that as a gap.

Proposal: a cancellable close-request event per window, raised by the close button, Alt+F4, the taskbar/Dock menu and delete-event, plus Window::Close(). Requirements from the reports below:

  • system shutdown, logoff and installer-initiated closes (WM_QUERYENDSESSION/WM_ENDSESSION, or a WM_CLOSE from another process) must not be silently swallowed
  • Cmd+Q / app termination on macOS should surface as an application-level quit request (cancellable), distinct from window close
  • it must not break Flutter's own AppLifecycleListener.onExitRequested when nobody listens
  • possibly the same pattern for minimize/maximize requests

Background:

  • leanflutter/window_manager#356: setPreventClose blocks the MSI installer from closing the app
  • leanflutter/window_manager#362: Cmd+Q doesn't trigger onWindowClose on macOS
  • leanflutter/window_manager#466: window_manager breaks AppLifecycleListener.onExitRequested
  • leanflutter/window_manager#316: need setPreventMinimize / setPreventMaximize
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.