[][src]Function wayland_raw_protocol_bindings::client::pointer_constraints_unstable_v1::zwp_pointer_constraints_v1::zwp_pointer_constraints_v1_confine_pointer

pub unsafe fn zwp_pointer_constraints_v1_confine_pointer(
    zwp_pointer_constraints_v1: *mut zwp_pointer_constraints_v1,
    surface: *mut wl_surface,
    pointer: *mut wl_pointer,
    region: *mut wl_region,
    lifetime: u32
) -> *mut zwp_confined_pointer_v1

confine pointer to a region

The confine_pointer request lets the client request to confine the pointer cursor to a given region. This request may not take effect immediately; in the future, when the compositor deems implementation- specific constraints are satisfied, the pointer confinement will be activated and the compositor sends a confined event.

The intersection of the region passed with this request and the input region of the surface is used to determine where the pointer must be in order for the confinement to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the confinement to activate. If the region is null the surface input region is used.

The request will create a new object wp_confined_pointer which is used to interact with the confinement as well as receive updates about its state. See the the description of wp_confined_pointer for further information.