mirror of
https://github.com/danbulant/appit
synced 2026-06-18 13:51:02 +00:00
Window::clone fix
This commit is contained in:
parent
6c59e6942f
commit
93479b8111
2 changed files with 15 additions and 1 deletions
|
|
@ -20,6 +20,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
and `RunningWindow::outer_position`. `RunningWindow::set_position` has been
|
||||
renamed to `RunningWindow::set_outer_position`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- `Window`'s `Clone` implementation no longer requires its generic parameter to
|
||||
implement `Clone`.
|
||||
|
||||
### Added
|
||||
|
||||
- `PendingApp::on_startup` accepts a callback that will be invoked once the
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use crate::{
|
|||
};
|
||||
|
||||
/// A weak reference to a running window.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug)]
|
||||
pub struct Window<Message> {
|
||||
opened: OpenedWindow,
|
||||
sender: Weak<mpsc::SyncSender<WindowMessage<Message>>>,
|
||||
|
|
@ -61,6 +61,15 @@ impl<Message> Window<Message> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Message> Clone for Window<Message> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
opened: self.opened.clone(),
|
||||
sender: self.sender.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A builder for a window.
|
||||
///
|
||||
/// This type is similar to winit's
|
||||
|
|
|
|||
Loading…
Reference in a new issue