Add methods to grab and ungrab the mouse to Window.