diff --git a/Cargo.lock b/Cargo.lock index 9971bacc..4f2e8da9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,9 +69,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" +checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9" dependencies = [ "cfg-if", "crossbeam-utils", @@ -82,9 +82,9 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b979d76c9fcb84dffc80a73f7290da0f83e4c95773494674cb44b76d13a7a110" +checksum = "4dd435b205a4842da59efd07628f921c096bc1cc0a156835b4fa0bcb9a19bcce" dependencies = [ "cfg-if", "crossbeam-utils", @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" +checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" dependencies = [ "cfg-if", "lazy_static", @@ -128,9 +128,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.116" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74" +checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" [[package]] name = "lock_api" @@ -152,7 +152,7 @@ dependencies = [ [[package]] name = "nih_plug" -version = "0.1.0" +version = "0.0.0" dependencies = [ "assert_no_alloc", "cfg-if", @@ -160,7 +160,7 @@ dependencies = [ "lazy_static", "nih_plug_derive", "parking_lot", - "raw-window-handle", + "raw-window-handle 0.3.4", "serde", "serde_json", "vst3-sys", @@ -216,6 +216,16 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "raw-window-handle" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28f55143d0548dad60bb4fbdc835a3d7ac6acc3324506450c5fdd6e42903a76" +dependencies = [ + "libc", + "raw-window-handle 0.4.2", +] + [[package]] name = "raw-window-handle" version = "0.4.2" diff --git a/Cargo.toml b/Cargo.toml index d7cec467..86f10381 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,8 @@ cfg-if = "1.0" crossbeam = "0.8" lazy_static = "1.4" parking_lot = "0.12" -raw-window-handle = "0.4" +# 0.4.x doesn't work with baseview +raw-window-handle = "0.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" vst3-sys = { git = "https://github.com/robbert-vdh/vst3-sys.git", branch = "fix/atomic-reference-count" } diff --git a/src/wrapper/vst3.rs b/src/wrapper/vst3.rs index 6e5e19e6..437e3b75 100644 --- a/src/wrapper/vst3.rs +++ b/src/wrapper/vst3.rs @@ -1335,20 +1335,23 @@ impl IPlugView for WrapperView

{ if editor.is_none() { let type_ = CStr::from_ptr(type_); let handle = match type_.to_str() { + #[cfg(all(target_family = "unix", not(target_os = "macos")))] Ok(type_) if type_ == VST3_PLATFORM_X11_WINDOW => { - let mut handle = raw_window_handle::XcbHandle::empty(); + let mut handle = raw_window_handle::unix::XcbHandle::empty(); handle.window = parent as usize as u32; RawWindowHandle::Xcb(handle) } + #[cfg(all(target_os = "macos"))] Ok(type_) if type_ == VST3_PLATFORM_NSVIEW => { - let mut handle = raw_window_handle::AppKitHandle::empty(); + let mut handle = raw_window_handle::macos::MacOSHandle::empty(); handle.ns_view = parent; - RawWindowHandle::AppKit(handle) + RawWindowHandle::MacOS(handle) } + #[cfg(all(target_os = "windows"))] Ok(type_) if type_ == VST3_PLATFORM_HWND => { - let mut handle = raw_window_handle::Win32Handle::empty(); + let mut handle = raw_window_handle::windows::WindowsHandle::empty(); handle.hwnd = parent; - RawWindowHandle::Win32(handle) + RawWindowHandle::Windows(handle) } _ => { nih_debug_assert_failure!("Unknown window handle type: {:?}", type_);