Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Cancellable window close request (and app quit request) event

オープン
#65 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
cpp

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
C++
スター
34
フォーク
7
平均マージ
3日 1時間
マージ済み PR(30日)
1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

libnativeapi/nativeapi のほかの issue

libnativeapi/nativeapi の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。