Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Set the default DPI awareness for Zed (#8936)
Small White835703941951
diff --git a/crates/zed/build.rs b/crates/zed/build.rsindex daea199e21a..783995942f6 100644--- a/crates/zed/build.rs+++ b/crates/zed/build.rs@@ -44,8 +44,17 @@ fn main() {}}- // todo!("windows"): This is to avoid stack overflow. Remove it when solved.if std::env::var("CARGO_CFG_TARGET_ENV").ok() == Some("msvc".to_string()) {+ // todo!("windows"): This is to avoid stack overflow. Remove it when solved.println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024);++ let manifest = std::path::Path::new("resources/windows/manifest.xml");+ println!("cargo:rerun-if-changed={}", manifest.display());+ println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");++ println!(+ "cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",+ manifest.canonicalize().unwrap().display()+ );}}diff --git a/crates/zed/resources/windows/manifest.xml b/crates/zed/resources/windows/manifest.xmlnew file mode 100644index 00000000000..a2276d35ca3--- /dev/null+++ b/crates/zed/resources/windows/manifest.xml@@ -0,0 +1,8 @@+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">+ <asmv3:application>+ <asmv3:windowsSettings>+ <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>+ <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>+ </asmv3:windowsSettings>+ </asmv3:application>+</assembly>