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:
parent
1b24ff1abf
commit
63676c30d2
@ -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
|
||||
|
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user