handleWindowEvent only needs the display