Handle title and window flags