remember to destroy main window too
grab entire window, not individual subwindows