mirror of
https://github.com/wez/wezterm.git
synced 2024-09-20 19:27:22 +03:00
window: alternative shadow/ghost/macos fix
This one invalidates the shadow when we invalidate the window, so we should get to keep the shadow and lose the ghosts. refs: #310
This commit is contained in:
parent
e3100c937f
commit
f2b504ee1f
@ -405,10 +405,6 @@ impl Window {
|
||||
|
||||
window.setReleasedWhenClosed_(NO);
|
||||
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
|
||||
window.setHasShadow_(NO);
|
||||
let ns_color: id = msg_send![Class::get("NSColor").unwrap(), alloc];
|
||||
window.setBackgroundColor_(cocoa::appkit::NSColor::clearColor(ns_color));
|
||||
|
||||
@ -667,6 +663,10 @@ impl WindowOpsMut for WindowInner {
|
||||
fn invalidate(&mut self) {
|
||||
unsafe {
|
||||
let () = msg_send![*self.view, setNeedsDisplay: YES];
|
||||
// Explicitly invalidate the window shadow to avoid
|
||||
// leaving behind ghost remnants!
|
||||
// see: https://github.com/wez/wezterm/issues/310
|
||||
NSWindow::invalidateShadow(*self.window);
|
||||
}
|
||||
}
|
||||
fn set_title(&mut self, title: &str) {
|
||||
|
Loading…
Reference in New Issue
Block a user