Curses handles menu and text windows specially; their id numbers keep going up, so we need to check if the id is for a menu or text window instead of directly accessing the windows array.