mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-17 20:49:28 +00:00
Fixed autotype regression preventing self-autotyping. Added re-hiding for special placeholders
This commit is contained in:
@@ -190,7 +190,10 @@ static MPAutotypeDaemon *_sharedInstance;
|
||||
}
|
||||
|
||||
- (void)_runAutotypeWithEnvironment:(MPAutotypeEnvironment *)env {
|
||||
|
||||
if(env.isSelfTargeting) {
|
||||
return; // we do not want to target ourselves
|
||||
}
|
||||
|
||||
if(!self.hasNecessaryAutotypePermissions) {
|
||||
NSUserNotification *notification = [[NSUserNotification alloc] init];
|
||||
notification.title = NSLocalizedString(@"AUTOTYPE_NOTIFICATION_PERMISSIONS_MISSING_TITLE", "Title for autotype feedback on missing permissions");
|
||||
@@ -329,6 +332,10 @@ static MPAutotypeDaemon *_sharedInstance;
|
||||
usleep(globalDelay*NSEC_PER_USEC);
|
||||
}
|
||||
[command execute];
|
||||
/* re-hide after every command since this might have put us back up front */
|
||||
if(environment.hidden) {
|
||||
[NSApplication.sharedApplication hide:nil];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
|
||||
- (BOOL)isSelfTargeting {
|
||||
return NSRunningApplication.currentApplication.processIdentifier != _pid;
|
||||
return NSRunningApplication.currentApplication.processIdentifier == _pid;
|
||||
}
|
||||
|
||||
- (NSDictionary *)_infoDictionaryForApplication:(NSRunningApplication *)application {
|
||||
|
||||
Reference in New Issue
Block a user