mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 13:52:55 +03:00
parent
6b9401365c
commit
baf168e458
@ -702,19 +702,18 @@ impl WindowInner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn update_window_shadow(&mut self) {
|
fn update_window_shadow(&mut self) {
|
||||||
if config().window_background_opacity() < 1.0 {
|
let is_opaque = if config().window_background_opacity() >= 1.0 {
|
||||||
unsafe {
|
YES
|
||||||
self.window.setOpaque_(NO);
|
|
||||||
// Turn off the window shadow, because when the background is transparent
|
|
||||||
// having the shadow enabled seems to correlate with ghostly remnants
|
|
||||||
// see: https://github.com/wez/wezterm/issues/310
|
|
||||||
self.window.setHasShadow_(NO);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
NO
|
||||||
|
};
|
||||||
unsafe {
|
unsafe {
|
||||||
self.window.setOpaque_(YES);
|
self.window.setOpaque_(is_opaque);
|
||||||
self.window.setHasShadow_(YES);
|
// when transparent, also turn off the window shadow,
|
||||||
}
|
// because having the shadow enabled seems to correlate
|
||||||
|
// with ghostly remnants see:
|
||||||
|
// https://github.com/wez/wezterm/issues/310
|
||||||
|
self.window.setHasShadow_(is_opaque);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user