Closed
Description
After running git bisect, I found this to be the offending commit:
ea642fe9ff17e90a0ccc0ec95d007859c4ab02bc is the first bad commit
commit ea642fe9ff17e90a0ccc0ec95d007859c4ab02bc
Author: Sam Lantinga <[email protected]>
Date: Wed Jan 15 23:34:20 2025 -0800
cocoa: clear mouse focus based on NSEventTypeMouseExited events (#11991)
We can't directly set the mouse focus since we may get spammed by entered/exited events,
but we can process the current focus later in the mouseMoved handler in line with the
mouse motion event sequence.
Fixes https://github.com/libsdl-org/SDL/issues/8188
src/video/cocoa/SDL_cocoaevents.m | 2 ++
src/video/cocoa/SDL_cocoamouse.h | 1 +
src/video/cocoa/SDL_cocoamouse.m | 28 ++++++++++++++++++++++------
src/video/cocoa/SDL_cocoawindow.m | 6 ++++++
4 files changed, 31 insertions(+), 6 deletions(-)
Mouse events behave very wonky, they 100% don't work the first few seconds/moments/events. Then they start working but very oddly. I haven't fully figured out what's going on. I'm suspecting a state-bug, given the simple changes in the commit. @slouken you seemed to have edited this code last in #11991, while fixing #8188.