Remove parent from PlatformSpecific window settings
This commit is contained in:
parent
4e7cbbf98a
commit
b21e4567dc
3 changed files with 1 additions and 13 deletions
|
|
@ -33,8 +33,5 @@ web-time.workspace = true
|
||||||
dark-light.workspace = true
|
dark-light.workspace = true
|
||||||
dark-light.optional = true
|
dark-light.optional = true
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
|
||||||
raw-window-handle.workspace = true
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
approx = "0.5"
|
approx = "0.5"
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,8 @@
|
||||||
//! Platform specific settings for Windows.
|
//! Platform specific settings for Windows.
|
||||||
use raw_window_handle::RawWindowHandle;
|
|
||||||
|
|
||||||
/// The platform specific window settings of an application.
|
/// The platform specific window settings of an application.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub struct PlatformSpecific {
|
pub struct PlatformSpecific {
|
||||||
/// Parent window
|
|
||||||
pub parent: Option<RawWindowHandle>,
|
|
||||||
|
|
||||||
/// Drag and drop support
|
/// Drag and drop support
|
||||||
pub drag_and_drop: bool,
|
pub drag_and_drop: bool,
|
||||||
|
|
||||||
|
|
@ -17,7 +13,6 @@ pub struct PlatformSpecific {
|
||||||
impl Default for PlatformSpecific {
|
impl Default for PlatformSpecific {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
parent: None,
|
|
||||||
drag_and_drop: true,
|
drag_and_drop: true,
|
||||||
skip_taskbar: false,
|
skip_taskbar: false,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,7 @@ pub fn window_attributes(
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
{
|
{
|
||||||
use winit::platform::windows::WindowAttributesExtWindows;
|
use winit::platform::windows::WindowAttributesExtWindows;
|
||||||
#[allow(unsafe_code)]
|
|
||||||
unsafe {
|
|
||||||
attributes = attributes
|
|
||||||
.with_parent_window(settings.platform_specific.parent);
|
|
||||||
}
|
|
||||||
attributes = attributes
|
attributes = attributes
|
||||||
.with_drag_and_drop(settings.platform_specific.drag_and_drop);
|
.with_drag_and_drop(settings.platform_specific.drag_and_drop);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue