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

Abierto
#345 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
swift
Área
desktop

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)

Lenguaje dominante
Swift
Estrellas
1.3k
Forks
41
Merge medio
4 h 46 min
PR fusionados (30 d)
86

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MMFoundation/WallpaperMachine

Todos los issues de MMFoundation/WallpaperMachine

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.