Skip to content

Mac: Clear mouse state on windowDidEndLiveResize event#71

Draft
moomerman wants to merge 2 commits intokarl-zylinski:masterfrom
moomerman:21-mac-resize-bug
Draft

Mac: Clear mouse state on windowDidEndLiveResize event#71
moomerman wants to merge 2 commits intokarl-zylinski:masterfrom
moomerman:21-mac-resize-bug

Conversation

@moomerman
Copy link
Contributor

@moomerman moomerman commented Jan 31, 2026

Hook into the windowDidEndLiveResize event and emit the Event_Window_Unfocused event which resets the state of the mouse (and other inputs).

Wasn't sure if we want to have another specific event for this, the Event_Window_Unfocsed event currently does what we want.

Screen.Recording.2026-01-31.at.10.38.03.mov

Fixes #31

Hook into the windowDidEndLiveResize event and emit the
Event_Window_Unfocused event which resets the state of the mouse
(and other inputs).
@moomerman moomerman changed the title Clear mouse state on windowDidEndLiveResize event Mac: Clear mouse state on windowDidEndLiveResize event Jan 31, 2026
@karl-zylinski
Copy link
Owner

Thanks for the PR. Yes, it is a bit weird that it uses the Unfocused event.

An idea that may or may not work: Check for the liveResizeStart event and if you are in a live resize, then only send the Event_Screen_Resize event when the live resize ends. This should also cause less backbuffer resize spam. But perhaps that doesn't solve the mouse button getting stuck? Perhaps we need a Window_Event_Reset_Input or something like that. I'm not 100% sure

@moomerman moomerman marked this pull request as draft February 3, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mac: Mouse click hangs if you resize window

2 participants

Comments