Encode time and event mask correctly for ChangeActivePointerGrab.