zed/crates/platform_title_bar
Smit Barmase 8e78b9fa97
Fix window drags when dragging button/input on titlebar in macOS (#51400)
Closes https://github.com/zed-industries/zed/issues/27500

This PR fixes an issue on macOS where dragging title bar buttons and
other UI elements would drag the window instead of no-op, like in native
Mac apps. That made interactions like selecting text with the mouse
impossible in those areas, including the title input in Rules Library.

We don't want to handle this at GPUI level, since you might still want
this dragging behavior while having no native titlebar for some apps,
and without implementing your own handler. So, we just handle this for
Zed.

On macOS, we now set `is_movable: false` on all windows, which disables
that drag-anything behavior and relies on the native window drag handler
for window dragging instead.

This also meant implementing a platform title bar for the sidebar in
Rules Library, since dragging there was previously handled by the
`is_movable` behavior. We already had a full-width platform title bar
there on other platforms. On macOS, it is sidebar-only to keep existing
design.
  
Release Notes:

- N/A
2026-03-12 21:16:48 +05:30
..
src Fix window drags when dragging button/input on titlebar in macOS (#51400) 2026-03-12 21:16:48 +05:30
Cargo.toml multiworkspace: Disable sidebar if disable_ai is enabled (#50137) 2026-02-25 23:01:59 +00:00
LICENSE-GPL build: Simplify build graph (#47253) 2026-01-23 18:29:20 +01:00