Skip to content

macos: Fix window move controls are disabled (#60620) (cherry-pick to preview) - #60966

Merged
zed-zippy[bot] merged 1 commit into
v1.11.xfrom
cherry-pick-v1.11.x-23bb2fc1
Jul 14, 2026
Merged

macos: Fix window move controls are disabled (#60620) (cherry-pick to preview)#60966
zed-zippy[bot] merged 1 commit into
v1.11.xfrom
cherry-pick-v1.11.x-23bb2fc1

Conversation

@zed-zippy

@zed-zippy zed-zippy Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #60620 to preview


Closes #60595

cc Anthony-Eid since you did an initial pass on this.

Objective

Currenly on macOs there is no way right now after the following
regression to use window management short keys to move them around. This
worked before, but was regressed initially in
#59836 that tried fixing a
macos 27 clicking delay issue on the titlebar. That accidentally set the
native_window.setMovable_(is_movable as BOOL) to false. Because of
this mocos detects this and disables the window managements actions
because it thinks the window can/should not be able to move.

Solution

The macOS 27 click delay actually comes from AppKit's native titlebar
dragging, not from NSWindow.isMovable. The problem is that
is_movable is also what enables the Window menu's tiling options, and
#59836 used it to turn off dragging, which disabled the tiling menu as a
side effect.

To fix this, I restored is_movable to its real meaning so the tiling
menu works again, and added a separate
WindowOptions::app_owns_titlebar_drag flag for windows that draw their
own titlebar and handle dragging via Window::start_window_move. On
macOS this tells AppKit to stop owning titlebar drags (removing the
click delay) without affecting is_movable. Zed's main window now sets
both is_movable: true and app_owns_titlebar_drag: true, so the
tiling menu stays enabled, the click delay is gone. I also added a
window_movable gpui example to make this behavior easy to test
manually.

Testing

I added a gpui test example that helps testing this bug. You can run the
newly added gpui example with 4 different window configurations that
should confirm that this change is the right one for all of the window
types that we have.

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards
    (UX/UI
    and
    icon
    guidelines)
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Showcase

After (note this now shows the window managements entries as they
were greyed out.)

Screen.Recording.2026-07-08.at.20.10.34.mov

GPUI (test examples with different window configurations.)

Screen.Recording.2026-07-08.at.21.11.07.mov

Release Notes:

  • Fix macos window management controlls were grayed out/not working

Closes #60595

cc Anthony-Eid since you did an initial pass on this.

# Objective

Currenly on macOs there is no way right now after the following
regression to use window management short keys to move them around. This
worked before, but was regressed initially in
#59836 that tried fixing a
macos 27 clicking delay issue on the titlebar. That accidentally set the
`native_window.setMovable_(is_movable as BOOL)` to false. Because of
this mocos detects this and disables the window managements actions
because it thinks the window can/should not be able to move.

## Solution

The macOS 27 click delay actually comes from AppKit's native titlebar
dragging, not from `NSWindow.isMovable`. The problem is that
`is_movable` is also what enables the Window menu's tiling options, and
#59836 used it to turn off dragging, which disabled the tiling menu as a
side effect.

To fix this, I restored `is_movable` to its real meaning so the tiling
menu works again, and added a separate
`WindowOptions::app_owns_titlebar_drag` flag for windows that draw their
own titlebar and handle dragging via `Window::start_window_move`. On
macOS this tells AppKit to stop owning titlebar drags (removing the
click delay) without affecting `is_movable`. Zed's main window now sets
both `is_movable: true` and `app_owns_titlebar_drag: true`, so the
tiling menu stays enabled, the click delay is gone. I also added a
`window_movable` gpui example to make this behavior easy to test
manually.

## Testing

I added a gpui test example that helps testing this bug. You can run the
newly added gpui example with 4 different window configurations that
should confirm that this change is the right one for all of the window
types that we have.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

**After** (note this now shows the window managements entries as they
were greyed out.)


https://github.com/user-attachments/assets/192cc0e1-15d8-486f-b788-a92bb51fb7d1

**GPUI** (test examples with different window configurations.)


https://github.com/user-attachments/assets/c9e0f4d3-606b-4cd7-b4d8-a5bb16508164

---

Release Notes:

- Fix macos window management controlls were grayed out/not working
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 14, 2026
@zed-community-bot zed-community-bot Bot added the bot Pull requests authored by a bot label Jul 14, 2026
@zed-zippy
zed-zippy Bot merged commit ab70b2c into v1.11.x Jul 14, 2026
65 of 67 checks passed
@zed-zippy
zed-zippy Bot deleted the cherry-pick-v1.11.x-23bb2fc1 branch July 14, 2026 13:17
@zed-zippy zed-zippy Bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label Jul 15, 2026
@Veykril

Veykril commented Jul 15, 2026

Copy link
Copy Markdown
Member

@zed-industries/approved

@zed-zippy zed-zippy Bot removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label Jul 15, 2026
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…cherry-pick to preview) (zed-industries#60966)

Cherry-pick of zed-industries#60620 to preview

----
Closes zed-industries#60595

cc Anthony-Eid since you did an initial pass on this.

# Objective

Currenly on macOs there is no way right now after the following
regression to use window management short keys to move them around. This
worked before, but was regressed initially in
zed-industries#59836 that tried fixing a
macos 27 clicking delay issue on the titlebar. That accidentally set the
`native_window.setMovable_(is_movable as BOOL)` to false. Because of
this mocos detects this and disables the window managements actions
because it thinks the window can/should not be able to move.

## Solution

The macOS 27 click delay actually comes from AppKit's native titlebar
dragging, not from `NSWindow.isMovable`. The problem is that
`is_movable` is also what enables the Window menu's tiling options, and
zed-industries#59836 used it to turn off dragging, which disabled the tiling menu as a
side effect.

To fix this, I restored `is_movable` to its real meaning so the tiling
menu works again, and added a separate
`WindowOptions::app_owns_titlebar_drag` flag for windows that draw their
own titlebar and handle dragging via `Window::start_window_move`. On
macOS this tells AppKit to stop owning titlebar drags (removing the
click delay) without affecting `is_movable`. Zed's main window now sets
both `is_movable: true` and `app_owns_titlebar_drag: true`, so the
tiling menu stays enabled, the click delay is gone. I also added a
`window_movable` gpui example to make this behavior easy to test
manually.

## Testing

I added a gpui test example that helps testing this bug. You can run the
newly added gpui example with 4 different window configurations that
should confirm that this change is the right one for all of the window
types that we have.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards

([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and

[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

**After** (note this now shows the window managements entries as they
were greyed out.)



https://github.com/user-attachments/assets/192cc0e1-15d8-486f-b788-a92bb51fb7d1

**GPUI** (test examples with different window configurations.)



https://github.com/user-attachments/assets/c9e0f4d3-606b-4cd7-b4d8-a5bb16508164

---

Release Notes:

- Fix macos window management controlls were grayed out/not working

Co-authored-by: Remco Smits <djsmits12@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants