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

@ -23,7 +23,6 @@ use crate::event::{Ime, WindowEvent};
use crate::event_loop::AsyncRequestSerial;
use crate::platform_impl::{
Fullscreen, MonitorHandle as PlatformMonitorHandle, OsError, PlatformIcon,
PlatformSpecificWindowBuilderAttributes as PlatformAttributes,
};
use crate::window::{
Cursor, CursorGrabMode, ImePurpose, ResizeDirection, Theme, UserAttentionType,
@ -84,7 +83,6 @@ impl Window {
pub(crate) fn new(
event_loop_window_target: &EventLoopWindowTarget,
attributes: WindowAttributes,
platform_attributes: PlatformAttributes,
) -> Result<Self, RootOsError> {
let queue_handle = event_loop_window_target.queue_handle.clone();
let mut state = event_loop_window_target.state.borrow_mut();
@ -134,7 +132,7 @@ impl Window {
window_state.set_decorate(attributes.decorations);
// Set the app_id.
if let Some(name) = platform_attributes.name.map(|name| name.general) {
if let Some(name) = attributes.platform_specific.name.map(|name| name.general) {
window.set_app_id(name);
}
@ -177,7 +175,7 @@ impl Window {
// Activate the window when the token is passed.
if let (Some(xdg_activation), Some(token)) = (
xdg_activation.as_ref(),
platform_attributes.activation_token,
attributes.platform_specific.activation_token,
) {
xdg_activation.activate(token._token, &surface);
}