From f10735f96fb11428cf714e11c90ce64cfdf73e07 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Mon, 4 Nov 2019 15:47:54 +0100 Subject: [PATCH] Changed screen recording detection to use "at least one window name should be present) --- MacPass/MPAutotypeDoctor.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MacPass/MPAutotypeDoctor.m b/MacPass/MPAutotypeDoctor.m index 5ac00a69..cf1e3dbb 100644 --- a/MacPass/MPAutotypeDoctor.m +++ b/MacPass/MPAutotypeDoctor.m @@ -73,12 +73,9 @@ if(windowName) { numberOfWindowsWithName++; } - else { - break; //breaking early, numberOfWindowsWithName not increased - } } CFRelease(windowList); - BOOL canRecordScreen = (numberOfWindows == numberOfWindowsWithName); + BOOL canRecordScreen = (numberOfWindows == 0) || (numberOfWindowsWithName > 0); if(!canRecordScreen && error) { *error = [NSError errorInDomain:MPAutotypeErrorDomain withCode:MPErrorAutotypeIsMissingScreenRecordingPermissions description:NSLocalizedString(@"ERROR_NO_PERMISSION_TO_RECORD_SCREEN", "Error description for missing screen recording permissions")]; }