diff --git a/.changes/remove-drag-drop-feature.md b/.changes/remove-drag-drop-feature.md new file mode 100644 index 000000000..7c720ff01 --- /dev/null +++ b/.changes/remove-drag-drop-feature.md @@ -0,0 +1,5 @@ +--- +wry: minor +--- + +Removed `drag-drop` feature, previously gated `WebViewAttributes::drag_drop_handler` and `WebViewBuilder::with_drag_drop_handler` are now always available diff --git a/Cargo.toml b/Cargo.toml index 8afe29588..299ce6db0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ exclude = ["/.changes", "/.github", "/audits", "/wry-logo.svg"] [package.metadata.docs.rs] no-default-features = true -features = ["drag-drop", "protocol", "os-webview"] +features = ["protocol", "os-webview"] targets = [ "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", @@ -24,9 +24,8 @@ targets = [ ] [features] -default = ["drag-drop", "protocol", "os-webview", "x11"] +default = ["protocol", "os-webview", "x11"] serde = ["dpi/serde"] -drag-drop = [] protocol = [] devtools = [] transparent = [] diff --git a/examples/simple.rs b/examples/simple.rs index 6b3657338..e9c53569f 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -20,7 +20,6 @@ fn main() -> wry::Result<()> { wry::NewWindowResponse::Allow }); - #[cfg(feature = "drag-drop")] let builder = builder.with_drag_drop_handler(|e| { match e { wry::DragDropEvent::Enter { paths, position } => { diff --git a/src/lib.rs b/src/lib.rs index de979345c..5907f23ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -655,11 +655,7 @@ pub struct WebViewAttributes<'a> { /// /// Note, that if you do block this behavior, it won't be possible to drop files on `` forms. /// Also note, that it's not possible to manually set the value of a `` via JavaScript for security reasons. - #[cfg(feature = "drag-drop")] - #[cfg_attr(docsrs, doc(cfg(feature = "drag-drop")))] pub drag_drop_handler: Option bool>>, - #[cfg(not(feature = "drag-drop"))] - drag_drop_handler: Option bool>>, /// A navigation handler to decide if incoming url is allowed to navigate. /// @@ -1167,8 +1163,6 @@ impl<'a> WebViewBuilder<'a> { /// /// Note, that if you do block this behavior, it won't be possible to drop files on `` forms. /// Also note, that it's not possible to manually set the value of a `` via JavaScript for security reasons. - #[cfg(feature = "drag-drop")] - #[cfg_attr(docsrs, doc(cfg(feature = "drag-drop")))] pub fn with_drag_drop_handler(mut self, handler: F) -> Self where F: Fn(DragDropEvent) -> bool + 'static,