Skip to content

Implement proper grabbing behavior on macOS #1093

@Osspial

Description

@Osspial

Right now on macOS, the cursor just gets locked to its current location, instead of getting locked to the area of the window. A proper solution that locks the cursor to the window exists and is documented, but hasn't been implemented yet.

See this comment:

pub fn set_cursor_grab(&self, grab: bool) -> Result<(), ExternalError> {
// TODO: Do this for real https://stackoverflow.com/a/40922095/5435443
CGDisplay::associate_mouse_and_mouse_cursor_position(!grab)
.map_err(|status| ExternalError::Os(os_error!(OsError::CGError(status))))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions