Skip to content

Commit

Permalink
On macOS, remove webview from window's NSView before dropping (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
wusyong committed Nov 13, 2022
1 parent 0647c0e commit 3d3ea80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/webview-remove.md
@@ -0,0 +1,5 @@
---
"wry": patch
---

On macOS, remove webview from window's NSView before dropping.
2 changes: 2 additions & 0 deletions src/webview/wkwebview/mod.rs
Expand Up @@ -880,6 +880,8 @@ impl Drop for InnerWebView {
}
}

// Remove webview from window's NSView before dropping.
let () = msg_send![self.webview, removeFromSuperview];
let _: Id<_> = Id::from_retained_ptr(self.webview);
let _: Id<_> = Id::from_retained_ptr(self.manager);
}
Expand Down

0 comments on commit 3d3ea80

Please sign in to comment.