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

@ -7,7 +7,6 @@ use objc2::{declare_class, mutability, ClassType, DeclaredClass};
use super::event_loop::EventLoopWindowTarget;
use super::window_delegate::WindowDelegate;
use super::PlatformSpecificWindowBuilderAttributes;
use crate::error::OsError as RootOsError;
use crate::window::WindowAttributes;
@ -28,10 +27,9 @@ impl Window {
pub(crate) fn new(
window_target: &EventLoopWindowTarget,
attributes: WindowAttributes,
pl_attribs: PlatformSpecificWindowBuilderAttributes,
) -> Result<Self, RootOsError> {
let mtm = window_target.mtm;
let delegate = autoreleasepool(|_| WindowDelegate::new(attributes, pl_attribs, mtm))?;
let delegate = autoreleasepool(|_| WindowDelegate::new(attributes, mtm))?;
Ok(Window {
window: MainThreadBound::new(delegate.window().retain(), mtm),
delegate: MainThreadBound::new(delegate, mtm),