gpui_macos: Improve mouse tracking for normal windows (#64234)

To reproduce:

1. Place Safari over part of Zed, then focus Zed.
2. Right-click Safari to open its context menu, then left-click Safari
anywhere in it.
3. Move the pointer over Safari where it covers the Zed. Zed shows hover
effects underneath.

Use a view tracking area and disable `acceptsMouseMovedEvents` for
normal macOS windows. This addresses hover effects on covered content
when the pointer moves over another window.

[Chromium also requests mouse movement through tracking
areas](https://github.com/chromium/chromium/blob/5a43095e95ffe566d1512b9d67d534e3ae05b975/components/remote_cocoa/app_shim/bridged_content_view.mm#L436-L465).
A search of its macOS window/view code found no explicit use of
`acceptsMouseMovedEvents`, which [defaults to
`false`](https://developer.apple.com/documentation/appkit/nswindow/acceptsmousemovedevents).

Tracking stays enabled in unfocused windows while the app is active.

Before:


https://github.com/user-attachments/assets/f21cd3e5-04d5-4d34-b495-02f8d0f68ecf

After:


https://github.com/user-attachments/assets/89a8b9c9-5aa3-4075-aa91-13e200ea3613

Release Notes:

- [GPUI] Fixed mouse tracking on macOS so moving the pointer over
another app’s window no longer triggers hover effects in covered GPUI
windows.
- Fixed an issue on macOS where moving the pointer over another app
could trigger hover effects in a Zed window underneath it.

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
db7f9ceed7Smit Barmase committed on 9/15/2026, 4:28:53 PM· committed by GitHubparenta95da07
2 files changedLine totals unavailable