Update windows-rs (#27379)

Release Notes:

- N/A
This commit is contained in:
张小白 2025-03-25 00:29:18 +08:00 committed by GitHub
parent 350c1e41d2
commit 57ffd6d78d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 45 deletions

77
Cargo.lock generated
View file

@ -2734,7 +2734,7 @@ dependencies = [
"serde",
"tempfile",
"util",
"windows 0.60.0",
"windows 0.61.1",
]
[[package]]
@ -2777,7 +2777,7 @@ dependencies = [
"tokio-socks",
"url",
"util",
"windows 0.60.0",
"windows 0.61.1",
"worktree",
]
@ -5248,7 +5248,7 @@ dependencies = [
"text",
"time",
"util",
"windows 0.60.0",
"windows 0.61.1",
]
[[package]]
@ -5685,7 +5685,7 @@ dependencies = [
"ui",
"unindent",
"util",
"windows 0.60.0",
"windows 0.61.1",
"workspace",
"zed_actions",
]
@ -5885,8 +5885,9 @@ dependencies = [
"wayland-cursor",
"wayland-protocols",
"wayland-protocols-plasma",
"windows 0.60.0",
"windows-core 0.60.1",
"windows 0.61.1",
"windows-core 0.61.0",
"windows-numerics",
"x11-clipboard",
"x11rb",
"xim",
@ -13918,7 +13919,7 @@ dependencies = [
"theme",
"thiserror 2.0.12",
"util",
"windows 0.60.0",
"windows 0.61.1",
]
[[package]]
@ -14296,7 +14297,7 @@ dependencies = [
"tree-sitter-md",
"ui",
"util",
"windows 0.60.0",
"windows 0.61.1",
"workspace",
"zed_actions",
"zeta",
@ -15018,7 +15019,7 @@ dependencies = [
"theme",
"ui_macros",
"util",
"windows 0.60.0",
"windows 0.61.1",
]
[[package]]
@ -16330,12 +16331,12 @@ dependencies = [
[[package]]
name = "windows"
version = "0.60.0"
version = "0.61.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529"
checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419"
dependencies = [
"windows-collections",
"windows-core 0.60.1",
"windows-core 0.61.0",
"windows-future",
"windows-link",
"windows-numerics",
@ -16343,11 +16344,11 @@ dependencies = [
[[package]]
name = "windows-collections"
version = "0.1.1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5467f79cc1ba3f52ebb2ed41dbb459b8e7db636cc3429458d9a852e15bc24dec"
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
dependencies = [
"windows-core 0.60.1",
"windows-core 0.61.0",
]
[[package]]
@ -16396,24 +16397,24 @@ dependencies = [
[[package]]
name = "windows-core"
version = "0.60.1"
version = "0.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247"
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
dependencies = [
"windows-implement 0.59.0",
"windows-interface 0.59.0",
"windows-implement 0.60.0",
"windows-interface 0.59.1",
"windows-link",
"windows-result 0.3.1",
"windows-strings 0.3.1",
"windows-result 0.3.2",
"windows-strings 0.4.0",
]
[[package]]
name = "windows-future"
version = "0.1.1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a787db4595e7eb80239b74ce8babfb1363d8e343ab072f2ffe901400c03349f0"
checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32"
dependencies = [
"windows-core 0.60.1",
"windows-core 0.61.0",
"windows-link",
]
@ -16441,9 +16442,9 @@ dependencies = [
[[package]]
name = "windows-implement"
version = "0.59.0"
version = "0.60.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1"
checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
dependencies = [
"proc-macro2",
"quote",
@ -16474,9 +16475,9 @@ dependencies = [
[[package]]
name = "windows-interface"
version = "0.59.0"
version = "0.59.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01"
checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
dependencies = [
"proc-macro2",
"quote",
@ -16485,17 +16486,17 @@ dependencies = [
[[package]]
name = "windows-link"
version = "0.1.0"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3"
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
[[package]]
name = "windows-numerics"
version = "0.1.1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "005dea54e2f6499f2cee279b8f703b3cf3b5734a2d8d21867c8f44003182eeed"
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
dependencies = [
"windows-core 0.60.1",
"windows-core 0.61.0",
"windows-link",
]
@ -16530,9 +16531,9 @@ dependencies = [
[[package]]
name = "windows-result"
version = "0.3.1"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189"
checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
dependencies = [
"windows-link",
]
@ -16549,9 +16550,9 @@ dependencies = [
[[package]]
name = "windows-strings"
version = "0.3.1"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
dependencies = [
"windows-link",
]
@ -17475,7 +17476,7 @@ dependencies = [
"vim",
"vim_mode_setting",
"welcome",
"windows 0.60.0",
"windows 0.61.1",
"winresource",
"workspace",
"zed_actions",

View file

@ -613,7 +613,7 @@ features = [
]
[workspace.dependencies.windows]
version = "0.60"
version = "0.61"
features = [
"Foundation_Collections",
"Foundation_Numerics",

View file

@ -205,7 +205,8 @@ blade-macros.workspace = true
flume = "0.11"
rand.workspace = true
windows.workspace = true
windows-core = "0.60"
windows-core = "0.61"
windows-numerics = "0.2"
[dev-dependencies]
backtrace = "0.3"

View file

@ -22,6 +22,7 @@ use windows::{
UI::WindowsAndMessaging::*,
},
};
use windows_numerics::Vector2;
use crate::*;
@ -668,7 +669,7 @@ impl DirectWriteState {
};
let bounds = unsafe {
render_target.GetGlyphRunWorldBounds(
D2D_POINT_2F { x: 0.0, y: 0.0 },
Vector2 { X: 0.0, Y: 0.0 },
&glyph_run,
DWRITE_MEASURING_MODE_NATURAL,
)?
@ -802,9 +803,9 @@ impl DirectWriteState {
let subpixel_shift = params
.subpixel_variant
.map(|v| v as f32 / SUBPIXEL_VARIANTS as f32);
let baseline_origin = D2D_POINT_2F {
x: subpixel_shift.x / params.scale_factor,
y: subpixel_shift.y / params.scale_factor,
let baseline_origin = Vector2 {
X: subpixel_shift.x / params.scale_factor,
Y: subpixel_shift.y / params.scale_factor,
};
// This `cast()` action here should never fail since we are running on Win10+, and
@ -1477,7 +1478,7 @@ fn is_color_glyph(
};
unsafe {
factory.TranslateColorGlyphRun(
D2D_POINT_2F::default(),
Vector2::default(),
&glyph_run as _,
None,
DWRITE_GLYPH_IMAGE_FORMATS_COLR