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

オープン
#345 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

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

調査の方向性

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.

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

説明

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)

主要言語
Swift
スター
1.3k
フォーク
41
平均マージ
4時間 46分
マージ済み PR(30日)
86

環境構築

はじめの一歩

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

MMFoundation/WallpaperMachine のほかの issue

MMFoundation/WallpaperMachine の issue をすべて見る

似ている issue

Swift の issue をもっと見る

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

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