I added a change to avoid calling XTranslateCoordinates if the parent is the root window, but in the other cases it's quite as it was before: synthetic events are rather the exceptional case, they happen when the window is being dragged but otherwise the events are in parent-relative coordinates, which were translated with XTranslateCoordinates before already.