Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix regression of main window dragging on Windows (#59967)

Wojciech Miłkowski480796c16875
diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs
index d4f3d958304..7e07e7f0f3f 100644
--- a/crates/zed/src/zed.rs
+++ b/crates/zed/src/zed.rs
@@ -377,8 +377,10 @@ pub fn build_window_options(display_uuid: Option<Uuid>, cx: &mut App) -> WindowO
focus: false,
show: false,
kind: WindowKind::Normal,
- // Zed handles window movement itself, so disable AppKit's titlebar dragging.
- is_movable: false,
+ // On macOS, Zed handles window movement itself, so disable AppKit's titlebar dragging.
+ // On other platforms, `is_movable` gates native window dragging (e.g. Windows'
+ // `HTCAPTION` hit test), so it must remain `true`.
+ is_movable: cfg!(not(target_os = "macos")),
display_id: display.map(|display| display.id()),
window_background: cx.theme().window_background_appearance(),
app_id: Some(app_id.to_owned()),