Liquid Glass settings window turns opaque when focused and see-through when not

Đang mở
#345 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
66/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
swift
Lĩnh vực
desktop

Hướng nghiên cứu

Start by reading App/Views/ControlPanel/Components/WindowGlassBackdrop.swift and the applyWindowStyle implementation mentioned in the report. Reproduce the focus changes with the Liquid Glass style and compare the backdrop state with the window’s key notifications. The issue is resolved when the background stays consistent or tracks focus changes promptly; the report notes that it was not reproducible after reopening the app.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: settings bug review: no-score Sonnet ui
Area

Settings

Wallpaper

Any

What you did
  1. Use the Liquid Glass window style.
  2. Open Settings › Displays.
  3. Switch between the Wallpaper Machine window and another app (CotEditor) a few times.
What went wrong

The window's background doesn't follow focus. It's often opaque while I use the window and see-through after I switch to another app. In the attached 15 s recording the macOS log shows 14 focus changes, but the background changes 5 times. At 4.0 s the window has focus (blue toggles and sidebar selection) and is opaque. At 2.5 s and 8.5 s it has lost focus (grey toggles) and is see-through.

I recorded this at 14:48, while the app was stuck after a failed quit (see #343). After I force-quit and reopened the app, I couldn't reproduce it, so the two bugs may be connected. The app log shows no errors during the recording.

Cause: WindowGlassBackdrop (App/Views/ControlPanel/Components/WindowGlassBackdrop.swift) uses an NSVisualEffectView with state = .followsWindowActiveState, inside a window that applyWindowStyle makes non-opaque with a clear background. The effect view seems to miss some focus changes and fall behind the window. I don't know whether AppKit or the SwiftUI hosting causes the lag, and I haven't tested a patched build.

Suggested fix: Set state = .active so the glass looks the same with or without focus, or set the state yourself on NSWindow.didBecomeKeyNotification and didResignKeyNotification.

What you expected

The window looks the same with or without focus, or at least changes at the same moment the focus does.

Diagnostics report

https://github.com/user-attachments/assets/4782c53d-2014-41a8-9454-43ce46515b5d

Details from the app

No response

App version

1.18.0 (71) (macOS 27.2.1)

Ngôn ngữ chính
Swift
Star
1.3k
Fork
41
Merge trung bình
4 giờ 46 phút
Pull request đã merge (30 ngày)
86

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MMFoundation/WallpaperMachine

Tất cả issue của MMFoundation/WallpaperMachine

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.