clean up mouse events to only listen on the window when the mouse is down