Menu bar items drawn as in the menu bar show the wrong part of the menu bar after a display change
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- 35/100
Hướng nghiên cứu
Start with Sources/StableBar/MenuBarItemMirror.swift and trace how it caches SCWindow frames and chooses a window for capture. Compare those listed frames with the window server’s current bounds before capturing, then refresh the list when they differ. Done means live menu bar items remain aligned after a display disconnect or resolution change; issue #822 has an open linked pull request.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
Items of a Menu bar items widget shown As in the menu bar ("display": "live") draw a slice of the macOS menu bar that belongs to other items after a display is disconnected or changes resolution. On a MacBook whose ultrawide monitor was unplugged, CodexBar's place on the bar showed the ChatGPT and MeetingBar icons and MeetingBar's place showed part of the Wi‑Fi and Sound icons. Each picture still opens its own item, so clicking the MeetingBar icon opens CodexBar and clicking the speaker opens MeetingBar. It stays that way until StableBar restarts.
Steps to reproduce
- On macOS 27, show two neighboring menu bar items on the bar with As in the menu bar, such as CodexBar and MeetingBar.
- Start StableBar while the display's menu bar is shorter than it will be later: on an external display without a notch (30 pt menu bar), or with the built-in display at a smaller "Looks like" resolution such as 1352 × 845.
- Disconnect the external display, or switch back to the default resolution (1512 × 982, 33 pt menu bar on a notched MacBook).
Expected
Each item shows what it shows in the macOS menu bar, at any display arrangement.
Environment
StableBar 0.18.0-beta.20261118082113.1362, macOS 27.2.1, MacBook Pro built-in display, ultrawide external monitor (3440 pt wide).
Evidence
- The bar's log after the change shows ScreenCaptureKit capturing MenuBarAgent's window 118495 with
frame=(0,0,3440,30)every two seconds, while the window server reports the same window at(0,0,1512,33). - Reproduced with the built-in display alone: started the installed build at 1352 × 845, switched to 1512 × 982 and captured the bar: its live items showed fragments of the neighboring icons. A build with the fix drew them correctly in the same run.
Diagnosis
MenuBarItemMirror (Sources/StableBar/MenuBarItemMirror.swift) keeps the SCWindows it listed and lists again only when none of their frames contains the item. MenuBarAgent keeps the same window when displays change and resizes it, so the cached frame still contains the item and is never refreshed. The capture uses that frame for its size, which scales the image (here by 30/33), so every item's crop lands about 9% too far right. It only shows when the window grows taller than when it was listed; a smaller window leaves the crops in place.
Fix: compare the listed frames with the window server's current bounds before capturing, and list again when they differ.
Related
#640 added the live copies. #799 asks for a widget-wide Show setting, unrelated.
Triaged by Claude Code (claude-opus-5-5).
- Ngôn ngữ chính
- Swift
- Star
- 184
- Fork
- 12
- Merge trung bình
- 3 giờ 50 phút
- Pull request đã merge (30 ngày)
- 387
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
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Allow the App Menu to display the frontmost app iconCó thể đã có người làm @khatami10 đã nhận hôm nay. Đang mởenhancement needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Seb-GRAF/StableBar
Issue tương tự
-
good first issue help wanted testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
area:cli documentation good first issue priority:low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
isaaclins/freesnitch#430 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MasterJ93/ATProtoKit#354 ·
-
enhancement help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày