Fix stack overflow crash in FileDropOverlayView

Merged
LA
9mo ago
+8-0

Summary

  • Fixes EXC_BAD_ACCESS (stack overflow) crash in production (Sentry #7273822119)
  • FileDropOverlayView.forwardEvent() uses a hide-send-unhide pattern to forward mouse events through to views below, but NSWindow.sendEvent() can re-deliver the event via gesture recognizer routing which doesn't respect isHidden, causing infinite recursion
  • Adds a re-entrancy guard (isForwarding flag) to break the cycle

Test plan

  • Verify file drag-and-drop from Finder still works on terminal views
  • Verify normal mouse clicks/scrolls pass through the overlay correctly
  • Confirm no crash on repeated rapid clicking with stale drag pasteboard