fix(instrument_drop): narrow FX hotspot to tcp.fx/mcp.fx, not bare tcp/mcp (S-VIEW-BUG-1)

This commit is contained in:
2026-07-27 13:34:40 -04:00
parent fef595be91
commit 5870b18362
4 changed files with 48 additions and 37 deletions
+8 -8
View File
@@ -33,14 +33,14 @@ struct FxDropTarget {
};
// Hit-test a screen point (REAPER screen coords) to an FX drop target. Wraps
// GetThingFromPoint, whose info string tells us what was hit ("tcp"/"mcp" for a track panel,
// "fx_chain"/"fx_N" for the FX area/button). `overReaperUi` is the shell-supplied predicate
// the pure drag_out::decideGesture consumes (true when the point is over REAPER's own UI —
// i.e. GetThingFromPoint returned a track OR a recognizable non-track thing, false when the
// pointer has left REAPER entirely). `overFxHotspot` is true when the info string names the
// FX region specifically — the S17 "FX-button hotspot vs. whole TCP" question is resolved to
// the FX hotspot (the discoverable, unambiguous target), decided here from the SDK's own
// hit-test string rather than a home-grown geometry guess.
// GetThingFromPoint, whose info string tells us what was hit ("tcp.fx"/"mcp.fx" for the TCP/MCP
// FX button; "fx_chain"/"fx_N" for the FX-chain and floating-FX windows; bare "tcp"/"mcp" or
// other "tcp.*"/"mcp.*" tokens for non-FX track-panel regions). `overReaperUi` is the
// shell-supplied predicate the pure drag_out::decideGesture consumes (true when the point is
// over REAPER's own UI — i.e. GetThingFromPoint returned a track OR a recognizable non-track
// thing, false when the pointer has left REAPER entirely). `overFxHotspot` is true only when
// the info string names a genuine FX-bearing surface ("tcp.fx", "mcp.fx", or "fx_*") —
// decided by instrument_drop::infoNamesFxHotspot from the SDK's own hit-test string.
FxDropTarget resolveFxDropTarget(int screenX, int screenY);
// Perform the drop on `track`: add a fresh ReaSampler 9000 instance and inject `chunkBase64`