A second click on the Control Center widget doesn't close Control Center
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
Sources/StableBar/MenuBar/AppMenu.swiftから始め、openControlCenter()とそのshowsPanelチェックをissue #311と併せて読みます。controlCenterウィジェットを追加し、macOS上で2回クリックして再現します。2回目のクリックでコントロールセンターが閉じるはずです。issueによるとこれらのバージョンはテストされていないため、macOS 26以前での動作も確認します。
索引モデルが issue の本文から書いたものです。
説明
What happens
A click on the controlCenter widget opens macOS Control Center. A second click on the widget does nothing: the panel stays open until a click lands somewhere else.
Steps to reproduce
- Add a
controlCenterwidget to the bar. - Click it. Control Center opens.
- Click it again.
Expected
The second click closes Control Center, as a click on Control Center's own menu bar item does. #311 lists this in its checks: "Clicking the ellipsis or the Control Center button again closes what it opened."
Environment
- StableBar 0.20.0, and a build of
mainat e3b72d9 - macOS 27.2.1
- One display, AeroSpace running
Evidence
Probes on macOS 27.2.1:
- A click on the bar while Control Center's panel shows reaches the bar and leaves the panel open. macOS does not treat it as a click outside the panel.
- A second press of the Control Center menu bar item closes the panel.
- A press during the panel's fade-out, about 300 ms, is ignored.
Diagnosis
AppMenu.openControlCenter() in Sources/StableBar/MenuBar/AppMenu.swift returns early when showsPanel finds Control Center's panel on screen. #311 added that guard so that the click that closes the panel doesn't reopen it, which assumes macOS closes the panel on that click. On macOS 27.2.1 it doesn't, so the guard swallows the second click and nothing closes the panel.
Removing the guard, so every click presses the menu bar item, makes the widget a toggle on macOS 27.2.1. Not checked on macOS 26 and earlier, where the click on the bar may still close the panel by itself.
Related
- #311 added the widget and the guard.
- #620 and #622 are about the native menu bar showing when Control Center opens, a different problem.
pressUnlessOpenin the same file has the same "already open, do nothing" check for Menu bar items; not checked here.
Triaged by Claude Code (Claude Fable 5.2).
- 主要言語
- Swift
- スター
- 184
- フォーク
- 12
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Seb-GRAF/StableBar のほかの issue
-
enhancement P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement P3
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
Reduce CPU use and main-thread IPCs in bar updates, app switching and polling対応中かも @M4n0x が 1 日前に担当しました。 オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
enhancement P3
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
-
enhancement P3
難易度 4/5 3〜5日 初心者へのやさしさ 53/100
Seb-GRAF/StableBar の issue をすべて見る
似ている issue
-
area: models enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
rexmhall09/TUFF#69 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nikitabobko/AeroSpace#2427 · コメント 1 件 ·
メンテナーはふだん 8 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
android bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信