Add test to verify closing window via the mouse

This commit is contained in:
Antonio Scandurra 2022-06-23 14:18:53 +02:00
parent d9b5357234
commit 2dae0ddcdb
3 changed files with 69 additions and 33 deletions

View file

@ -37,7 +37,7 @@ pub struct Window {
event_handlers: Vec<Box<dyn FnMut(super::Event) -> bool>>,
resize_handlers: Vec<Box<dyn FnMut()>>,
close_handlers: Vec<Box<dyn FnOnce()>>,
should_close_handler: Option<Box<dyn FnMut() -> bool>>,
pub(crate) should_close_handler: Option<Box<dyn FnMut() -> bool>>,
pub(crate) title: Option<String>,
pub(crate) edited: bool,
pub(crate) pending_prompts: RefCell<VecDeque<oneshot::Sender<usize>>>,