Disable drag_and_drop attribute for boot window
This commit is contained in:
parent
d46f6f92ce
commit
cadc054651
1 changed files with 16 additions and 8 deletions
|
|
@ -296,14 +296,22 @@ where
|
|||
return;
|
||||
};
|
||||
|
||||
let window = match event_loop.create_window(
|
||||
winit::window::WindowAttributes::default().with_visible(false),
|
||||
) {
|
||||
Ok(window) => Arc::new(window),
|
||||
Err(error) => {
|
||||
self.error = Some(Error::WindowCreationFailed(error));
|
||||
event_loop.exit();
|
||||
return;
|
||||
let window = {
|
||||
let attributes = winit::window::WindowAttributes::default();
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
let attributes = {
|
||||
use winit::platform::windows::WindowAttributesExtWindows;
|
||||
attributes.with_drag_and_drop(false)
|
||||
};
|
||||
|
||||
match event_loop.create_window(attributes.with_visible(false)) {
|
||||
Ok(window) => Arc::new(window),
|
||||
Err(error) => {
|
||||
self.error = Some(Error::WindowCreationFailed(error));
|
||||
event_loop.exit();
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue