Move PlatformSpecificWindowBuilderAttributes (#3318)
This commit is contained in:
parent
aec608f93c
commit
d7c7ba1d6c
22 changed files with 145 additions and 156 deletions
|
|
@ -401,7 +401,6 @@ impl Window {
|
|||
pub(crate) fn new(
|
||||
event_loop: &EventLoopWindowTarget,
|
||||
window_attributes: WindowAttributes,
|
||||
platform_attributes: PlatformSpecificWindowBuilderAttributes,
|
||||
) -> Result<Window, RootOsError> {
|
||||
let mtm = event_loop.mtm;
|
||||
|
||||
|
|
@ -439,7 +438,7 @@ impl Window {
|
|||
None => screen_bounds,
|
||||
};
|
||||
|
||||
let view = WinitView::new(mtm, &window_attributes, &platform_attributes, frame);
|
||||
let view = WinitView::new(mtm, &window_attributes, frame);
|
||||
|
||||
let gl_or_metal_backed = unsafe {
|
||||
let layer_class = WinitView::layerClass();
|
||||
|
|
@ -448,15 +447,8 @@ impl Window {
|
|||
is_metal || is_gl
|
||||
};
|
||||
|
||||
let view_controller =
|
||||
WinitViewController::new(mtm, &window_attributes, &platform_attributes, &view);
|
||||
let window = WinitUIWindow::new(
|
||||
mtm,
|
||||
&window_attributes,
|
||||
&platform_attributes,
|
||||
frame,
|
||||
&view_controller,
|
||||
);
|
||||
let view_controller = WinitViewController::new(mtm, &window_attributes, &view);
|
||||
let window = WinitUIWindow::new(mtm, &window_attributes, frame, &view_controller);
|
||||
|
||||
app_state::set_key_window(mtm, &window);
|
||||
|
||||
|
|
@ -685,7 +677,7 @@ impl From<&AnyObject> for WindowId {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct PlatformSpecificWindowBuilderAttributes {
|
||||
pub scale_factor: Option<f64>,
|
||||
pub valid_orientations: ValidOrientations,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue