Fix SWELL drag guard, channel-fork the VST editor window class, dedupe own-module match
Panel drag no longer misfires on SWELL's always-zero wParam; stable/beta VST editors register distinct window classes against their own module instead of colliding on REAPER's; own-module basename matching moves to a tested pure helper.
This commit is contained in:
@@ -306,10 +306,19 @@ void onMouseMove(int x, int y, WPARAM wParam) {
|
||||
// A move with the button already up while still dragging means the release was missed (the
|
||||
// OS hand-off's own modal loop can eat a WM_LBUTTONUP, and coalescing can lose one too) —
|
||||
// treat it as the release now rather than leaving dragging stuck for the next plain click.
|
||||
#ifdef _WIN32
|
||||
if (g_panel.dragging && !(wParam & MK_LBUTTON)) {
|
||||
onLBtnUp(x, y);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
// SWELL never sets wParam on WM_MOUSEMOVE (swell-types.h ~1315), so the button-up test must
|
||||
// read the physical key state instead of the message's own (always-zero) wParam.
|
||||
if (g_panel.dragging && !(GetAsyncKeyState(VK_LBUTTON) & 0x8000)) {
|
||||
onLBtnUp(x, y);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Hover feedback: resolve + repaint-on-change, but NOT during a drag (the drag owns
|
||||
// the visual feedback then — a drop-target highlight, not a hover).
|
||||
|
||||
Reference in New Issue
Block a user