gpui: Stop synthetic mouse drags after button release on macOS (#64175)

## Objective

Native menu tracking can consume the mouse-up event that normally
cancels synthetic drag replay. Replaying that drag afterward would
alternate the stale pointer position with real mouse moves and flicker
hover state.

## Solution

Check `NSEvent.pressedMouseButtons` before replaying a synthetic drag
and stop when the original button is no longer physically pressed.
Another held button does not keep the old drag alive. Also stop the
timer when its window no longer exists.

The existing replay interval, generation cancellation, and callback
locking remain unchanged.

## Testing

To reproduce, slightly move while secondary-clicking a tab, dismiss its
native menu, then move across tabs and content. Before the fix, the old
tab's hover highlight can flicker as stale drag events repeat.

Release Notes:

- Fixed stale synthetic mouse drags causing hover flicker after native
menus are dismissed on macOS.
- [GPUI] Fix bug where native menu tracking could consume mouse up
events
382ff7a64bVitaly Kravchenko committed on 9/24/2026, 12:15:10 PM· committed by GitHubparentbaee1ca
1 file changedLine totals unavailable