T23: the owner's checks on macOS: on macOS 27 gpui's Selection material drew no blur, so blur/macos gives the window's effect view underWindowBackground, radius 30; a button at each end of the title bar hides and shows its column, kept in the settings; shot reads an effect view's blur radius; new comments cut to ten words
CI / platforms (ubuntu-24.04) (push) Successful in 2m9s
CI / platforms (windows-latest) (push) Successful in 2m32s
CI / macos (push) Successful in 17m37s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-15 14:42:28 -04:00
1 parent be8d0e20c5
commit 09930c2934
12 files changed
+216 -55

No files matched your search

+13 -2
View File
@@ -4,6 +4,8 @@ use gpui::{Window, WindowBackgroundAppearance};
use crate::settings::Settings;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "linux")]
mod wayland;
#[cfg(target_os = "linux")]
@@ -32,10 +34,15 @@ pub struct Blur {
impl Blur {
/// The window as `WindowOptions` opened it from these settings.
pub fn new(window: &Window, settings: &Settings) -> Self {
#[cfg(not(target_os = "linux"))]
let shown = appearance(settings);
#[cfg(target_os = "macos")]
if shown == WindowBackgroundAppearance::Blurred {
macos::blur(window);
}
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
let _ = window;
Self {
shown: appearance(settings),
shown,
#[cfg(target_os = "linux")]
wayland: wayland::Effect::on(window),
#[cfg(target_os = "linux")]
@@ -57,6 +64,10 @@ impl Blur {
self.shown = wanted;
window.set_background_appearance(wanted);
log::info!("blur: the window is {wanted:?} on {}", std::env::consts::OS);
#[cfg(target_os = "macos")]
if wanted == WindowBackgroundAppearance::Blurred {
macos::blur(window);
}
}
/// Keeps a Linux compositor's blur on the window's pane while Blurred; each frame, sending only a change.