Drop window borrow before calling makeKeyAndOrderFront

We're seeing some stack traces where calling `makeKeyAndOrderFront`
could invoke `setFrameSize`, which is causing a double borrow.
This commit is contained in:
Antonio Scandurra 2022-07-13 10:19:46 +02:00
parent b49b11f5af
commit d4e0f73ffe

View file

@ -402,7 +402,8 @@ impl platform::Window for Window {
}
fn activate(&self) {
unsafe { msg_send![self.0.borrow().native_window, makeKeyAndOrderFront: nil] }
let window = self.0.borrow().native_window;
unsafe { msg_send![window, makeKeyAndOrderFront: nil] }
}
fn set_title(&mut self, title: &str) {