allow disabling drag and drop on windows
This commit is contained in:
parent
e292821c37
commit
f04bc94b80
|
@ -100,6 +100,8 @@ impl Window {
|
||||||
if let Some(parent) = self.platform_specific.parent {
|
if let Some(parent) = self.platform_specific.parent {
|
||||||
window_builder = window_builder.with_parent_window(parent);
|
window_builder = window_builder.with_parent_window(parent);
|
||||||
}
|
}
|
||||||
|
window_builder = window_builder
|
||||||
|
.with_drag_and_drop(self.platform_specific.drag_and_drop);
|
||||||
}
|
}
|
||||||
|
|
||||||
window_builder
|
window_builder
|
||||||
|
|
|
@ -2,8 +2,19 @@
|
||||||
//! Platform specific settings for Windows.
|
//! Platform specific settings for Windows.
|
||||||
|
|
||||||
/// The platform specific window settings of an application.
|
/// The platform specific window settings of an application.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub struct PlatformSpecific {
|
pub struct PlatformSpecific {
|
||||||
/// Parent Window
|
/// Parent Window
|
||||||
pub parent: Option<winapi::shared::windef::HWND>,
|
pub parent: Option<winapi::shared::windef::HWND>,
|
||||||
|
/// Drap and Drop support
|
||||||
|
pub drag_and_drop: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for PlatformSpecific {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
parent: None,
|
||||||
|
drag_and_drop: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue