When opening a path in an existing window, move it to the foreground
This commit is contained in:
@@ -347,6 +347,12 @@ impl platform::Window for Window {
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
fn activate(&self) {
|
||||
unsafe {
|
||||
let _: () = msg_send![self.0.borrow().native_window, makeKeyAndOrderFront: nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl platform::WindowContext for Window {
|
||||
|
||||
@@ -223,6 +223,8 @@ impl super::Window for Window {
|
||||
fn prompt(&self, _: crate::PromptLevel, _: &str, _: &[&str], f: Box<dyn FnOnce(usize)>) {
|
||||
self.last_prompt.replace(Some(f));
|
||||
}
|
||||
|
||||
fn activate(&self) {}
|
||||
}
|
||||
|
||||
pub fn platform() -> Platform {
|
||||
|
||||
Reference in New Issue
Block a user