Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken mouse capture on macOS #12218

Open
slouken opened this issue Feb 8, 2025 · 2 comments
Open

Broken mouse capture on macOS #12218

slouken opened this issue Feb 8, 2025 · 2 comments
Assignees
Milestone

Comments

@slouken
Copy link
Collaborator

slouken commented Feb 8, 2025

Repro:

Click the left mouse button within a window and then move out of it with the button held down.

The window will not receive any more MouseMotion events despite being captured, even when moving the cursor back into the window while still holding the mouse button.

Maybe the fix:

Checking for SDL_WINDOW_MOUSE_CAPTURE in SDL_cocoawindow.m and not clearing the focus in case it's set seems to resolve the issue, but I'm not familiar enough with the codebase to consider all potential side effects - so just commenting here :)

Originally posted by @jcomusic in ea642fe

@slouken slouken added this to the 3.2.6 milestone Feb 8, 2025
@slouken slouken self-assigned this Feb 8, 2025
@niuzhaosen
Copy link

There is also a similar issue in sdl2, specifically manifested as MouseMotion no longer receiving when the button is held down to remove the window. Release the button and move back into the window, at which point MouseMotion can receive normally, but the MouseButton state is still held down.

@niuzhaosen
Copy link

sdl2 中也存在类似的问题,具体表现为当按住按钮以删除窗口时,MouseMotion 不再接收。释放按钮并移回窗口,此时 MouseMotion 可以正常接收,但 MouseButton 状态仍处于按住状态。

The above problem occurs on Windows and has not been attempted on other platforms yet.

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

No branches or pull requests

2 participants