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

Add support for SDL_GetGlobalMouseState #672

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

nspitko
Copy link
Contributor

@nspitko nspitko commented Apr 1, 2024

This allows us to track drag/resize movements that go outside the window; fixing the issue where dragging too fast will lose a handle on the window. The motivation behind this feature is to support ImGui multi-window viewports

Viewports will function without this, but moving/resizing windows sucks, as the mouse can move more than the title bar's width per frame, causing it to lose track of the window and "drop" it.

Unsure if there's a parallel to this in DX, but we can't use that backend currently anyway since it lacks single driver multi window support at the moment. Given this limitation I'm unsure there's any value in adding a similar function or common routing in hldx, but I can do this work if it's necessary for merge.

This allows us to track drag/resize movements that go outside the window; fixing the issue where dragging too fast will lose a handle on the window.

Viewports will function without this, but moving/resizing windows sucks.

Unsure if there's a parallel to this in DX, but we can't use that backend currently anyway since it lacks single driver multi window support at the moment.
@ncannasse
Copy link
Member

Please add @:hlNative("?sdl","get_global_mouse_state") so someone using new headers without recompiling the library won't get a startup error if they're not using the function.

@nspitko
Copy link
Contributor Author

nspitko commented Apr 7, 2024

Oh neat, I didn't know you could do that.

Added.

@ncannasse ncannasse merged commit f463d71 into HaxeFoundation:master Apr 8, 2024
5 of 9 checks passed
GlassySundew pushed a commit to GlassySundew/hashlink that referenced this pull request May 11, 2024
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.

2 participants