mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 21:32:13 +03:00
parent
6b9401365c
commit
baf168e458
@ -702,19 +702,18 @@ impl WindowInner {
|
||||
}
|
||||
|
||||
fn update_window_shadow(&mut self) {
|
||||
if config().window_background_opacity() < 1.0 {
|
||||
unsafe {
|
||||
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);
|
||||
}
|
||||
let is_opaque = if config().window_background_opacity() >= 1.0 {
|
||||
YES
|
||||
} else {
|
||||
NO
|
||||
};
|
||||
unsafe {
|
||||
self.window.setOpaque_(YES);
|
||||
self.window.setHasShadow_(YES);
|
||||
}
|
||||
self.window.setOpaque_(is_opaque);
|
||||
// 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