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

[feat] expose tao::Window::set_cursor_grab #3888

Closed
CaptainTux opened this issue Apr 11, 2022 · 0 comments
Closed

[feat] expose tao::Window::set_cursor_grab #3888

CaptainTux opened this issue Apr 11, 2022 · 0 comments
Assignees

Comments

@CaptainTux
Copy link

Describe the problem

I have a react app where I can click and drag elements around.
I would like the mouse to stay in the window when it reaches the window's bounding box, so that the mouse doesn't leave the window at all until the dragging finishes

Describe the solution you'd like

I would like an api command that locks/unlocks the mouse pointer to the Tauri window.

Alternatives considered

I have tried creating custom commands using winapi, but I ran into issues with GetClientRect not working properly.

Additional context

No response

@amrbashir amrbashir changed the title [feat] Lock the mouse pointer to the tauri window [feat] expose tao::Window::set_cursor_grab Apr 12, 2022
@lucasfernog lucasfernog self-assigned this Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants