A second click on the Control Center widget doesn't close Control Center

オープン 初心者向け
#998 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@MaHofseth がすでに取り組んでいます。

2026年12月4日 から。

  • #999 @MaHofseth による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
macos, swift
領域
backend, desktop

調査の方向性

Sources/StableBar/MenuBar/AppMenu.swiftから始め、openControlCenter()とそのshowsPanelチェックをissue #311と併せて読みます。controlCenterウィジェットを追加し、macOS上で2回クリックして再現します。2回目のクリックでコントロールセンターが閉じるはずです。issueによるとこれらのバージョンはテストされていないため、macOS 26以前での動作も確認します。

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

説明

needs-triage

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

  1. Add a controlCenter widget to the bar.
  2. Click it. Control Center opens.
  3. 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 main at 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.
  • pressUnlessOpen in 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 はありません

環境構築

はじめの一歩

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

Seb-GRAF/StableBar のほかの issue

Seb-GRAF/StableBar の issue をすべて見る

似ている issue

Swift の issue をもっと見る

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

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