server: Fix SendEvent

The specified window has an xid, not necessarily a windowId.