Move PlatformSpecificWindowBuilderAttributes (#3318)

This commit is contained in:
daxpedda 2024-01-17 23:37:28 +01:00 committed by GitHub
parent aec608f93c
commit d7c7ba1d6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 145 additions and 156 deletions

View file

@ -30,8 +30,7 @@ pub struct Inner {
impl Window {
pub(crate) fn new(
target: &EventLoopWindowTarget,
attr: WindowAttributes,
platform_attr: PlatformSpecificWindowBuilderAttributes,
mut attr: WindowAttributes,
) -> Result<Self, RootOE> {
let id = target.generate_id();
@ -42,8 +41,7 @@ impl Window {
id,
window.clone(),
document.clone(),
&attr,
platform_attr,
&mut attr,
)?;
let canvas = Rc::new(RefCell::new(canvas));
@ -467,7 +465,7 @@ impl From<u64> for WindowId {
}
}
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct PlatformSpecificWindowBuilderAttributes {
pub(crate) canvas: Option<Arc<MainThreadSafe<backend::RawCanvasType>>>,
pub(crate) prevent_default: bool,