mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 03:02:28 +03:00
fix(core): build without dialog Cargo features (#1973)
This commit is contained in:
parent
cd1a299a7d
commit
49fb3b7225
5
.changes/fix-dialog-allowlist..md
Normal file
5
.changes/fix-dialog-allowlist..md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes build without the dialog Cargo features.
|
@ -144,12 +144,12 @@ fn set_default_path(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(windows, any(dialog_open, dialog_save)))]
|
||||
struct WindowParent {
|
||||
hwnd: *mut std::ffi::c_void,
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(windows, any(dialog_open, dialog_save)))]
|
||||
unsafe impl raw_window_handle::HasRawWindowHandle for WindowParent {
|
||||
fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
|
||||
let mut handle = raw_window_handle::windows::WindowsHandle::empty();
|
||||
@ -158,7 +158,7 @@ unsafe impl raw_window_handle::HasRawWindowHandle for WindowParent {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(windows, any(dialog_open, dialog_save)))]
|
||||
fn parent<P: Params>(window: Window<P>) -> crate::Result<WindowParent> {
|
||||
Ok(WindowParent {
|
||||
hwnd: window.hwnd()?,
|
||||
|
Loading…
Reference in New Issue
Block a user