diff --git a/MacPass/Base.lproj/AutotypeDoctorReportViewController.xib b/MacPass/Base.lproj/AutotypeDoctorReportViewController.xib
index c3c3ddf7..ac3b8b3f 100644
--- a/MacPass/Base.lproj/AutotypeDoctorReportViewController.xib
+++ b/MacPass/Base.lproj/AutotypeDoctorReportViewController.xib
@@ -10,6 +10,7 @@
+
@@ -18,27 +19,15 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -46,7 +35,7 @@
-
+ MacPass will send key press events to the system when Autotype or Global Autotype is executed. Since macOS 10.14 Mojave this is only possible, if Accessibility permissions are granted to the application.
@@ -55,7 +44,7 @@
-
+
-
+ MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will check if it can read every window title of currently visible windows. This test will not read the actual title. The titles aren't stored or processed in any way.
@@ -77,8 +66,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To request Screen Recording permissions, MacPass will try to capture a 1 by 1 Pixel sized screenshot of the top left part of your screen. The data is not stored nor processed in any way.
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
-
-
+
-
+
+
+
+
-
+
-
-
+
diff --git a/MacPass/MPAutotypeDoctor.h b/MacPass/MPAutotypeDoctor.h
index ea8f537a..55d02a3b 100644
--- a/MacPass/MPAutotypeDoctor.h
+++ b/MacPass/MPAutotypeDoctor.h
@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)runChecksAndPresentResults;
- (void)openScreenRecordingPreferences;
+- (void)requestScreenRecordingPermission;
- (void)openAccessibiltyPreferences;
- (void)openAutomationPreferences;
diff --git a/MacPass/MPAutotypeDoctor.m b/MacPass/MPAutotypeDoctor.m
index ba83799f..5ac00a69 100644
--- a/MacPass/MPAutotypeDoctor.m
+++ b/MacPass/MPAutotypeDoctor.m
@@ -107,6 +107,22 @@
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:@"x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture"]];
}
+- (void)requestScreenRecordingPermission {
+ /* macos 10.14 and lower do not require screen recording permission to get window titles */
+ if(@available(macos 10.15, *)) {
+ /*
+ To minimize the intrusion just make a 1px image of the upper left corner
+ This way there is no real possibilty to access any private data
+ */
+ CGImageRef screenshot = CGWindowListCreateImage(
+ CGRectMake(0, 0, 1, 1),
+ kCGWindowListOptionOnScreenOnly,
+ kCGNullWindowID,
+ kCGWindowImageDefault);
+ CFRelease(screenshot);
+ }
+}
+
- (void)openAutomationPreferences {
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:@"x-apple.systempreferences:com.apple.preference.security?Privacy_Automation"]];
}
diff --git a/MacPass/MPAutotypeDoctorReportViewController.h b/MacPass/MPAutotypeDoctorReportViewController.h
index 83d3b9ea..f25e4036 100644
--- a/MacPass/MPAutotypeDoctorReportViewController.h
+++ b/MacPass/MPAutotypeDoctorReportViewController.h
@@ -17,12 +17,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong) IBOutlet NSImageView *screenRecordingStatusImageView;
@property (strong) IBOutlet NSTextField *screenRecordingStatusTextField;
+@property (strong) IBOutlet NSButton *requestScreenRecordingButton;
- (IBAction)openAccessibiltyPreferences:(id)sender;
- (IBAction)openScreenRecordingPreferences:(id)sender;
+- (IBAction)requestScreenRecordingPermissions:(id)sender;
- (IBAction)openAutomationPreferences:(id)sender;
-
@end
NS_ASSUME_NONNULL_END
diff --git a/MacPass/MPAutotypeDoctorReportViewController.m b/MacPass/MPAutotypeDoctorReportViewController.m
index 52440ec1..fd16c3a0 100644
--- a/MacPass/MPAutotypeDoctorReportViewController.m
+++ b/MacPass/MPAutotypeDoctorReportViewController.m
@@ -29,6 +29,10 @@
[MPAutotypeDoctor.defaultDoctor openScreenRecordingPreferences];
}
+- (IBAction)requestScreenRecordingPermissions:(id)sender {
+ [MPAutotypeDoctor.defaultDoctor requestScreenRecordingPermission];
+}
+
- (void)openAutomationPreferences:(id)sender {
[MPAutotypeDoctor.defaultDoctor openAutomationPreferences];
}
@@ -38,7 +42,7 @@
NSError *error;
if([MPAutotypeDoctor.defaultDoctor hasAccessibiltyPermissions:&error]) {
self.accessibiltyStatusImageView.image = [NSImage imageNamed:NSImageNameStatusAvailable];
- self.accessibiltyStatusTextField.stringValue = NSLocalizedString(@"AUTOTYPE_STATUS_ACCESSIBILTY_PERMISSIONS_OK", "Status lable when no issue were found in accessibilty");
+ self.accessibiltyStatusTextField.stringValue = NSLocalizedString(@"AUTOTYPE_STATUS_ACCESSIBILTY_PERMISSIONS_OK", "Status label when no issue were found in accessibilty");
}
else {
self.accessibiltyStatusImageView.image = [NSImage imageNamed:NSImageNameStatusUnavailable];
@@ -50,10 +54,12 @@
}
}
if([MPAutotypeDoctor.defaultDoctor hasScreenRecordingPermissions:&error]) {
+ self.requestScreenRecordingButton.enabled = NO;
self.screenRecordingStatusImageView.image = [NSImage imageNamed:NSImageNameStatusAvailable];
- self.screenRecordingStatusTextField.stringValue = NSLocalizedString(@"AUTOTYPE_STATUS_SCREEN_RECORDING_PERMISSIONS_OK", "Status lable when no issue were found in screen recording permissions");
+ self.screenRecordingStatusTextField.stringValue = NSLocalizedString(@"AUTOTYPE_STATUS_SCREEN_RECORDING_PERMISSIONS_OK", "Status label when no issue were found in screen recording permissions");
}
else {
+ self.requestScreenRecordingButton.enabled = YES;
self.screenRecordingStatusImageView.image = [NSImage imageNamed:NSImageNameStatusUnavailable];
if(error && error.localizedDescription) {
self.screenRecordingStatusTextField.stringValue = error.localizedDescription;