event/x11: Rework the way we translate X11 events