mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07:00
build(deps): update windows crate to 0.61.1 (#743)
This commit is contained in:
Generated
+4
-68
@@ -2441,7 +2441,7 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
"uuid",
|
||||
"whoami",
|
||||
"windows 0.58.0",
|
||||
"windows 0.61.1",
|
||||
"winit",
|
||||
]
|
||||
|
||||
@@ -2474,7 +2474,7 @@ dependencies = [
|
||||
"ironrdp-core",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
"windows 0.58.0",
|
||||
"windows 0.61.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5898,16 +5898,6 @@ dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.58.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
|
||||
dependencies = [
|
||||
"windows-core 0.58.0",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.61.1"
|
||||
@@ -5949,27 +5939,14 @@ dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-core"
|
||||
version = "0.58.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
|
||||
dependencies = [
|
||||
"windows-implement 0.58.0",
|
||||
"windows-interface 0.58.0",
|
||||
"windows-result 0.2.0",
|
||||
"windows-strings 0.1.0",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-core"
|
||||
version = "0.61.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
|
||||
dependencies = [
|
||||
"windows-implement 0.60.0",
|
||||
"windows-interface 0.59.1",
|
||||
"windows-implement",
|
||||
"windows-interface",
|
||||
"windows-link",
|
||||
"windows-result 0.3.2",
|
||||
"windows-strings 0.4.0",
|
||||
@@ -5985,17 +5962,6 @@ dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-implement"
|
||||
version = "0.58.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-implement"
|
||||
version = "0.60.0"
|
||||
@@ -6007,17 +5973,6 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-interface"
|
||||
version = "0.58.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-interface"
|
||||
version = "0.59.1"
|
||||
@@ -6065,15 +6020,6 @@ dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-result"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-result"
|
||||
version = "0.3.2"
|
||||
@@ -6083,16 +6029,6 @@ dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-strings"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
|
||||
dependencies = [
|
||||
"windows-result 0.2.0",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-strings"
|
||||
version = "0.3.1"
|
||||
|
||||
@@ -78,7 +78,7 @@ raw-window-handle = "0.6"
|
||||
uuid = { version = "1.16" }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows = { version = "0.58", features = ["Win32_Foundation"] }
|
||||
windows = { version = "0.61", features = ["Win32_Foundation"] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -22,7 +22,7 @@ tracing = { version = "0.1", features = ["log"] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
thiserror = "1"
|
||||
windows = { version = "0.58", features = [
|
||||
windows = { version = "0.61", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Graphics_Gdi",
|
||||
"Win32_System_DataExchange",
|
||||
|
||||
@@ -152,7 +152,7 @@ impl WinClipboard {
|
||||
CW_USEDEFAULT,
|
||||
None,
|
||||
None,
|
||||
instance,
|
||||
Some(instance.into()),
|
||||
None,
|
||||
)?
|
||||
};
|
||||
|
||||
@@ -271,7 +271,7 @@ impl WinClipboardImpl {
|
||||
// SAFETY: `SetTimer` is always safe to call when `hwnd` is a valid window handle
|
||||
unsafe {
|
||||
SetTimer(
|
||||
self.window,
|
||||
Some(self.window),
|
||||
IDT_CLIPBOARD_RETRY,
|
||||
self.attempt * PROCESSING_TIMEOUT_MS,
|
||||
None,
|
||||
@@ -370,7 +370,7 @@ pub(crate) unsafe extern "system" fn clipboard_subproc(
|
||||
// Timer is one-shot, we need to stop it immediately
|
||||
|
||||
// SAFETY: `KillTimer` is always safe to call when `hwnd` is a valid window handle.
|
||||
if let Err(err) = unsafe { KillTimer(hwnd, IDT_CLIPBOARD_RETRY) } {
|
||||
if let Err(err) = unsafe { KillTimer(Some(hwnd), IDT_CLIPBOARD_RETRY) } {
|
||||
tracing::error!("Failed to kill timer: {}", err);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ impl WinCliprdrBackend {
|
||||
// Wake up subproc event loop; Dont wait for result
|
||||
//
|
||||
// SAFETY: it is safe to call PostMessageW from any thread with a valid window handle
|
||||
if let Err(err) = unsafe { PostMessageW(self.window, WM_CLIPRDR_BACKEND_EVENT, WPARAM(0), LPARAM(0)) } {
|
||||
if let Err(err) = unsafe { PostMessageW(Some(self.window), WM_CLIPRDR_BACKEND_EVENT, WPARAM(0), LPARAM(0)) } {
|
||||
tracing::error!("Failed to post message to wake up subproc event loop: {}", err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use ironrdp_cliprdr::pdu::{ClipboardFormat, ClipboardFormatId, ClipboardFormatName};
|
||||
use tracing::error;
|
||||
use windows::Win32::Foundation::{HANDLE, HWND};
|
||||
use windows::Win32::Foundation::HWND;
|
||||
use windows::Win32::System::DataExchange::{
|
||||
CloseClipboard, EmptyClipboard, EnumClipboardFormats, GetClipboardFormatNameW, OpenClipboard, SetClipboardData,
|
||||
};
|
||||
@@ -14,7 +14,7 @@ pub(crate) struct OwnedOsClipboard;
|
||||
impl OwnedOsClipboard {
|
||||
pub(crate) fn new(window: HWND) -> Result<Self, WinCliprdrError> {
|
||||
// SAFETY: `window` is valid handle, therefore it is safe to call `OpenClipboard`.
|
||||
unsafe { OpenClipboard(window)? };
|
||||
unsafe { OpenClipboard(Some(window))? };
|
||||
Ok(Self)
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ impl OwnedOsClipboard {
|
||||
pub(crate) fn delay_render(&mut self, format: ClipboardFormatId) -> Result<(), WinCliprdrError> {
|
||||
// SAFETY: We own the clipboard at moment of method invocation, therefore it is safe to
|
||||
// call `SetClipboardData`.
|
||||
let result = unsafe { SetClipboardData(format.value(), HANDLE(core::ptr::null_mut())) };
|
||||
let result = unsafe { SetClipboardData(format.value(), None) };
|
||||
|
||||
if let Err(err) = result {
|
||||
// `windows` crate will return `Err(..)` on err zero handle, but for `SetClipboardData`
|
||||
|
||||
@@ -44,7 +44,7 @@ impl GlobalMemoryBuffer {
|
||||
impl Drop for GlobalMemoryBuffer {
|
||||
fn drop(&mut self) {
|
||||
// SAFETY: It is safe to call GlobalFree on a valid handle
|
||||
if let Err(err) = unsafe { GlobalFree(self.0) } {
|
||||
if let Err(err) = unsafe { GlobalFree(Some(self.0)) } {
|
||||
error!("Failed to free global clipboard data handle: {}", err);
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ pub(crate) unsafe fn render_format(format: ClipboardFormatId, data: &[u8]) -> Wi
|
||||
|
||||
// SAFETY: If described above safety requirements of `render_format` call are met, then
|
||||
// `SetClipboardData` is safe to call.
|
||||
let _ = unsafe { SetClipboardData(format.value(), handle) };
|
||||
let _ = unsafe { SetClipboardData(format.value(), Some(handle)) };
|
||||
|
||||
// We successfully transferred ownership of the data to the clipboard, we don't need to
|
||||
// call drop on handle
|
||||
|
||||
Reference in New Issue
Block a user