Cursor.lockState triggering onEvent callback

Hi! I’m using unity 6b15 and Input System 1.8.1. When I lock cursor with Cursor.lockState = CursorLockMode.Locked; it triggers onEvent callback which I use to detect active device.

InputSystem.onEvent += (eventPtr, device) =>
{
    if (!eventPtr.IsA<StateEvent>() && !eventPtr.IsA<DeltaStateEvent>())
        return;

    foreach (InputControl control in eventPtr.EnumerateChangedControls(device, InputSystem.settings.defaultButtonPressPoint))
    {
        if (ActiveDevice == control.device)
            return;

        ActiveDevice = control.device;
        OnActiveDeviceChanged(ActiveDevice);
    }
};

It triggers Mouse/position/x control supposedly because cursor is being moved/teleported at the center of screen when locking and it thinks I’m moving my mouse because of it.