Skip to content

gpui_windows: Fix window drag repositioning - #60064

Closed
Prohect wants to merge 3 commits into
zed-industries:mainfrom
Prohect:fix/windows-titlebar-drag
Closed

gpui_windows: Fix window drag repositioning#60064
Prohect wants to merge 3 commits into
zed-industries:mainfrom
Prohect:fix/windows-titlebar-drag

Conversation

@Prohect

@Prohect Prohect commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Return HTCAPTION from WM_NCHITTEST for Drag areas when using a custom titlebar, so Windows can handle the drag natively via DefWindowProcW — regardless of the is_movable flag.

Commit 9ac1176 ("Fix immovable windows skipping hit testing") changed Drag to only return HTCAPTION when is_movable is true, but Zed's main window has is_movable set to false for macOS compatibility. This caused the title bar to become undraggable on Windows.

Also suppress a spurious error log from ImmNotifyIME that could report ERROR_SUCCESS (0x00000000) as an error.

Closes #58521

https://youtu.be/uARmzk7ocyE

Release Notes:

  • Fixed window title bar not responding to drag on Windows

Return HTCAPTION from WM_NCHITTEST for Drag areas when using a custom
titlebar, so Windows can handle the drag natively via DefWindowProcW -
regardless of the is_movable flag.

Commit 9ac1176 ("Fix immovable windows skipping hit testing")
changed Drag to only return HTCAPTION when is_movable is true, but Zed's
main window has is_movable set to false for macOS compatibility.
This caused the title bar to become undraggable on Windows.

Also suppress a spurious error log from ImmNotifyIME that could report
ERROR_SUCCESS (0x00000000) as an error.

Closes zed-industries#58521
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 29, 2026
@Prohect

Prohect commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

this bug is recently introduced to the Nightly verison.

It doesnt exist on the newest release version

Zed 1.8.2 
Commit: 5e33fc855f6fe58dd82ed6acb1f58034c3fb6bac
Version: 1.8.2+stable.314.5e33fc855f6fe58dd82ed6acb1f58034c3fb6bac

nor the newest preview version

Zed Preview 1.9.0 
Commit: 0a64bc9d6dfa30e429767f2f62d0eb12efb7defa
Version: 1.9.0+preview.313.0a64bc9d6dfa30e429767f2f62d0eb12efb7defa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dragging the window or resizing it is super buggy

1 participant