Function input_sys::libinput_device_set_seat_logical_name[][src]

pub unsafe extern "C" fn libinput_device_set_seat_logical_name(
    device: *mut libinput_device,
    name: *const c_char
) -> c_int
Expand description

@ingroup device

Change the logical seat associated with this device by removing the device and adding it to the new seat.

This command is identical to physically unplugging the device, then re-plugging it as a member of the new seat. libinput will generate a @ref LIBINPUT_EVENT_DEVICE_REMOVED event and this @ref libinput_device is considered removed from the context; it will not generate further events and will be freed when the refcount reaches zero. A @ref LIBINPUT_EVENT_DEVICE_ADDED event is generated with a new @ref libinput_device handle. It is the caller’s responsibility to update references to the new device accordingly.

If the logical seat name already exists in the device’s physical seat, the device is added to this seat. Otherwise, a new seat is created.

@note This change applies to this device until removal or @ref libinput_suspend(), whichever happens earlier.

@param device A previously obtained device @param name The new logical seat name @return 0 on success, non-zero on error