Skip to content

win: return HTCLIENT from WM_NCHITTEST to prevent modal resize freeze#223

Open
Shipi1 wants to merge 1 commit intoRustAudio:masterfrom
Shipi1:fix/win-nchittest-modal-freeze
Open

win: return HTCLIENT from WM_NCHITTEST to prevent modal resize freeze#223
Shipi1 wants to merge 1 commit intoRustAudio:masterfrom
Shipi1:fix/win-nchittest-modal-freeze

Conversation

@Shipi1
Copy link

@Shipi1 Shipi1 commented Mar 6, 2026

  • When hosted as a VST3 child window in DAWs (Ableton, etc.), moving the mouse to the bottom/right window border while clicking causes Windows to enter a modal resize loop that freezes the entire plugin window.
  • Cause: When MouseDown is active and move the mouse outside the window's border, WM_NCHITTEST is triggered returning HTBOTTOM/HTRIGHT/HTBOTTOMRIGHT
  • Fix: wnd_proc_inner always return HTCLIENT since plugin windows are embedded and should never be user-resizable via border dragging. this tells Windows the mouse is always in the client area.
  • Tested in Ableton Live 12.3.1

@micahrj
Copy link
Member

micahrj commented Mar 6, 2026

I'm very surprised that this would be necessary. I would think that the WM_NCHITTEST message would only ever be sent to the top-level window and would not be sent to the plugin's child window in the first place. I also can't find any similar logic in the JUCE or Visage Win32 windowing code. I could be wrong, but I'm somewhat skeptical that this is the correct diagnosis or fix for the problem you are running into.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants