A second click on the Control Center widget doesn't close Control Center
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu trong Sources/StableBar/MenuBar/AppMenu.swift, đọc openControlCenter() và kiểm tra showsPanel của hàm này cùng với issue #311. Tái hiện bằng cách thêm widget controlCenter, sau đó nhấp vào nó hai lần trên macOS; lần nhấp thứ hai sẽ đóng Trung tâm điều khiển. Cũng kiểm tra hành vi trên macOS 26 và các phiên bản cũ hơn, vì issue cho biết những phiên bản đó chưa được kiểm thử.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Swift
- Star
- 184
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Seb-GRAF/StableBar
-
enhancement P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Reduce CPU use and main-thread IPCs in bar updates, app switching and pollingCó thể đã có người làm @M4n0x đã nhận 1 ngày trước. Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
enhancement P3
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
-
enhancement P3
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 53/100
Tất cả issue của Seb-GRAF/StableBar
Issue tương tự
-
area: models enhancement needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
rexmhall09/TUFF#69 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nikitabobko/AeroSpace#2427 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: privacy statementĐang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
android bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày