Open a new window when activating Zed from the dock w/ no windows open

This commit is contained in:
Max Brunsfeld 2023-03-29 17:24:44 -07:00
parent 7601e7902a
commit b5f762ab25
5 changed files with 49 additions and 17 deletions

View file

@ -90,6 +90,10 @@ pub(crate) trait ForegroundPlatform {
fn on_become_active(&self, callback: Box<dyn FnMut()>);
fn on_resign_active(&self, callback: Box<dyn FnMut()>);
fn on_quit(&self, callback: Box<dyn FnMut()>);
/// Handle the application being re-activated with no windows open.
fn on_reopen(&self, callback: Box<dyn FnMut()>);
fn on_event(&self, callback: Box<dyn FnMut(Event) -> bool>);
fn on_open_urls(&self, callback: Box<dyn FnMut(Vec<String>)>);
fn run(&self, on_finish_launching: Box<dyn FnOnce()>);