Fix drag-out giving live drags to OLE: prove the pointer left REAPER

OffReaper leaves the surface vocabulary; OsHandoff now gates on a window-ownership
proof resolved in the shell, so no in-REAPER surface can reach DoDragDrop.
This commit is contained in:
2026-08-03 15:50:25 -04:00
parent d5280687f3
commit 9599e96e0c
14 changed files with 221 additions and 109 deletions
+5 -3
View File
@@ -24,10 +24,12 @@ DropClass decideDropClass(int px, int py, const PanelClientRect& client,
if (!ctx.drag.dragging || !ctx.drag.hasArmedSamples) return DropClass::None;
if (insideClient(px, py, client)) return DropClass::Internal;
switch (ctx.surface) {
case ReaperSurface::OffReaper:
return DropClass::OsHandoff;
// The hand-off gate sits AHEAD of the surface switch and is the only route to OsHandoff, so
// no reading of REAPER's hit-test — recognised, unrecognised, or empty — can reach the modal
// OLE loop while the pointer is still over a host window.
if (ctx.pointerOffHost) return DropClass::OsHandoff;
switch (ctx.surface) {
case ReaperSurface::TrackPanel:
case ReaperSurface::FxSurface:
// One instance holds one capture, so a multi payload names no instrument to build —