Handle Microsoft apps consistently, fix 0-window app bug