1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-12 21:30:45 +03:00

refactor(config & macos/windows): rename window_background_blur to macos_window_background_blur

This commit is contained in:
Gkirito 2023-03-25 02:41:10 +08:00 committed by Wez Furlong
parent 1b24ff1abf
commit 63676c30d2
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
2 changed files with 8 additions and 4 deletions

View File

@ -485,7 +485,7 @@ pub struct Config {
/// Only works on MacOS
#[dynamic(default)]
pub window_background_blur: i64,
pub macos_window_background_blur: i64,
/// Specifies the alpha value to use when rendering the background
/// of the window. The background is taken either from the

View File

@ -59,7 +59,11 @@ const NSViewLayerContentsRedrawDuringViewResize: NSInteger = 2;
#[link(name = "CoreGraphics", kind = "framework")]
extern "C" {
fn CGSMainConnectionID() -> id;
fn CGSSetWindowBackgroundBlurRadius(connect_id: id, window_id: NSInteger, radius: i64) -> i32;
fn CGSSetWindowBackgroundBlurRadius(
connection_id: id,
window_id: NSInteger,
radius: i64,
) -> i32;
}
fn round_away_from_zerof(value: f64) -> f64 {
@ -570,7 +574,7 @@ impl Window {
CGSSetWindowBackgroundBlurRadius(
CGSMainConnectionID(),
window.windowNumber(),
config.window_background_blur,
config.macos_window_background_blur,
);
window.setContentView_(*view);
window.setDelegate_(*view);
@ -1043,7 +1047,7 @@ impl WindowInner {
CGSSetWindowBackgroundBlurRadius(
CGSMainConnectionID(),
self.window.windowNumber(),
self.config.window_background_blur,
self.config.macos_window_background_blur,
);
}
}