Skip to content

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

@CaptainTux

Description

@CaptainTux

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions