Set the window title correctly for untitled documents